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