You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
assignee=Noneclosed_at=<Date2010-10-27.07:27:23.678>created_at=<Date2009-05-08.22:31:08.961>labels= ['type-feature', 'library']
title="csv unix file format ('\\n' line terminator)"updated_at=<Date2010-10-27.07:27:23.676>user='https://bugs.python.org/jtalbot'
I was having issues importing a csv file generated by the csv.write
class with the following:
load data infile 'file.csv' replace into table en fields terminated by
',' enclosed by '"' lines terminated by '\r\n';
To help prevent this from happening again, I would like to see the
following added to the csv.py library:
"""Describe the usual properties of unix-generated CSV files."""delimiter=','quotechar='"'doublequote=Trueskipinitialspace=Falselineterminator='\n'quoting=QUOTE_ALLregister_dialect("unix_dialect", unix_dialect)
The above code is the excel class dialect with '\n' line termination and
quoting of all fields. This allows for easy csv file import into mysql