Last active
October 2, 2019 08:38
-
-
Save sehrishnaz/bbe952a0a6e299cfa5daa09c41d61c68 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
self.env.cr.execute(""" CREATE TABLE IF NOT EXISTS your_table( | |
count decimal, mean decimal, std decimal, min decimal, twentyfive decimal, | |
fifty decimal, seventyfive decimal, max decimal, cv decimal, | |
uid integer, report_type text,name text)""") | |
self.env.cr.commit() | |
csv_file= open(filepath,"r") | |
columns=['count','mean','std','min','twentyfive','fifty','seventyfive','max','cv','uid','report_type','name'] | |
self.env.cr.copy_from(csv_file, 'your_table', sep='|', columns=columns) | |
self.env.cr.commit() | |
csv_file.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment