I would like to save a python list in a .csv
file, for example I have a list like this:
[\'hello\',\'how\',\'are\',\'you\']
I woul
You can just pass this as the value of a dict with key 'column' to a DataFrame constructor and then call to_csv
on the df:
In [43]:
df = pd.DataFrame({'column':['hello','how','are','you']})
df
Out[43]:
column
0 hello
1 how
2 are
3 you
In [44]:
df.to_csv()
Out[44]:
',column\n0,hello\n1,how\n2,are\n3,you\n'