how to convert dataframe to text file in python with header code example
Example: save df to txt
df.to_csv(r'c:\data\pandas.txt', header=None, index=None, sep='\t', mode='a')
df.to_csv(r'c:\data\pandas.txt', header=None, index=None, sep='\t', mode='a')