dataframe write to tab delimited differs from Excel - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: dataframe write to tab delimited differs from Excel (/thread-34447.html) |
dataframe write to tab delimited differs from Excel - koh - Aug-01-2021 Hi, I use econtrol_df.to_csv('econsolidated.txt',sep='\t',header=False,index=False) but the created (text) tab delimited file differs from the one when I opened the csv file in Excel and saved it under (text) tab delimited. Please advise how to get the same using dataframe write to (text) tab delimited file. created using Excel Mary BLK3 "A, Y 'Az" Jack BLK4 Y Sam BLK5 4/3/2021 "ABDUL, Makki" IRGC Sean BLK6 "AB, H; AL-NA, AL-KHU, Ta" Siti BLK7 Y Sofian Ali BLK8 4/3/2002 29/6/2056 Y "A-A-S, 'A l-M M Y; 'U a-Q; 'U l-T" created using dataframe '\t' Mary BLK3 A, Y 'Az Jack BLK4 Y Sam BLK5 4/3/2021 ABDUL, Makki IRGC Sean BLK6 AB, H; AL-NA, AL-KHU, Ta Siti BLK7 Y Sofian Ali BLK8 4/3/2002 29/6/2056 Y A-A-S, 'A l-M M Y; 'U a-Q; 'U l-T Thank you! Koh |