Question : how to convert dataframe to text
Answered by : dizzy-donkey-lbjv0gkleu1g
np.savetxt(r'c:\data\np.txt', df.values, fmt='%d', delimiter='\t')
Source : https://stackoverflow.com/questions/31247198/python-pandas-write-content-of-dataframe-into-text-file | Last Update : Wed, 18 May 22
Question : to text pandas
Answered by :
You can use pandas.DataFrame.to_csv(), and setting both index and header to False:
Source : | Last Update : Tue, 18 May 21