import_from_csv_file: how to map columns

21 views
Skip to first unread message

goome

unread,
Jan 13, 2016, 7:33:20 AM1/13/16
to web2py-users
Hi
i created i table definition in db.py by using csvstudio.py, but i cannot load the values through db.table.import_from_csv_file becouse the header in the csv have spaces and uppercases.
So there a way to tell import_from_csv_file how to map column in csv with that in table definition?
By the way, column in csv are in the same order than in table definition.
Thanks

Anthony

unread,
Jan 13, 2016, 10:38:12 AM1/13/16
to web2py-users
I think you'll have to manually change the column names in the file, either by hand or via Python code.

Anthony

goome

unread,
Jan 13, 2016, 12:35:56 PM1/13/16
to web2py-users

Thanks for your help!
Reply all
Reply to author
Forward
0 new messages