I have read the manual here and saw this answer, but it is not working:
>>> import pandas as pd
>>> import csv
>>> pd.Series([my_list]).to_csv('output.tsv',sep='\t',index=False,header=False, quoting=csv.QUOTE_NONE)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: to_csv() got an unexpected keyword argument 'quoting'
Without the quoting argument, it works.
pd.Series([my_list]).to_csv('output.tsv',sep='\t',index=False,header=False)
But this is incompatible with my intended usage.
To make things even more confusing, when I wrote out a table this way, there were no quotes, and no errors:
my_dataframe.to_csv('output2.tsv',sep='\t', quoting=csv.QUOTE_NONE)
Any idea what is going on?
quoting
argument to Series.to_csv, so it's not surprising you are getting that error. Is there a reason you can't just use aDataFrame
?DataFrame
is necessary after all. No big deal, I will just do that instead. Thanks.