Python Forum
dataframe write to tab delimited differs from Excel
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
dataframe write to tab delimited differs from Excel
#1
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
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Tab Delimited Strings? johnywhy 7 555 Jan-13-2024, 10:34 PM
Last Post: sgrey
  How do I write all csv records to Excel ? Revox 2 953 Mar-29-2023, 03:53 PM
Last Post: deanhystad
  Reading data from excel file –> process it >>then write to another excel output file Jennifer_Jone 0 1,091 Mar-14-2023, 07:59 PM
Last Post: Jennifer_Jone
  how to read txt file, and write into excel with multiply sheet jacklee26 14 9,914 Jan-21-2023, 06:57 AM
Last Post: jacklee26
  Openpyxl manipulate excel write formula SamLiu 0 1,052 Nov-04-2022, 03:00 PM
Last Post: SamLiu
  Problem in saving .xlsm (excel) file using pandas dataframe in python shantanu97 2 4,270 Aug-29-2021, 12:39 PM
Last Post: snippsat
  Read and write active Excel file euras 4 3,487 Jun-29-2021, 11:16 PM
Last Post: Pedroski55
  write to excel will be empty in column jacklee26 7 3,356 Jun-27-2020, 12:09 AM
Last Post: snippsat
  Saving Excel workbook file with dataframe names Biplab1985 0 2,026 Jun-07-2020, 12:25 PM
Last Post: Biplab1985
  Write tables from Word (.docx) to Excel (.xlsx) using xlsxwriter jackie 1 3,198 May-27-2020, 11:47 PM
Last Post: mcmxl22

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020