Reputation: 1057
I am a knew to python and I started my first codes in Python but I can not write my data to a text file. Can anyone help me in writing my data here to a text file:
I am using Python 3.4
In [66]:data
Out[66]:
var1 var2
20:22:49.999985 0.2160 0.1720
Upvotes: 0
Views: 1822
Reputation: 12641
You can
file = open('filename', 'w');
file.write(data.to_string()); // if data is a pandas.DataFrame object
file.close();
Upvotes: 1