Question #67   Submitted by Answiki on 06/13/2020 at 10:30:44 PM UTC

How to save a DataFrame in a tabulation delimited file (.tsv) in Python?

Answer   Submitted by Answiki on 01/11/2021 at 05:26:01 PM UTC

In Python, to create a tabulation delimited file from a dataframe, the best option is to use the .to_csv() method while specifying the delimiter character:

myDataframe.to_csv('filename.tsv', sep = '\t')

To prevent the index of each row from being stored in the file, add index=False as a second parameter:

myDataframe.to_csv('filename.tsv', sep = '\t', index=False)


6 events in history
Answer by Answiki on 01/11/2021 at 05:26:01 PM

In Python, to create a tabulation delimited file from a dataframe, the best option is to use the .to_csv() method while specifying the delimiter character:

myDataframe.to_csv('filename.tsv', sep = '\t')

To prevent the index of each row from being stored in the file, add index=False as a second parameter:

myDataframe.to_csv('filename.tsv', sep = '\t', index=False)


Answer by Answiki on 10/08/2020 at 11:49:56 AM

In Python, to create a tabulation delimited file from a dataframe, the best option is to use the .to_csv() method while specifying the delimiter character:

myDataframe.to_csv('filename.tsv', sep = '\t')

Answer by Answiki on 10/08/2020 at 11:49:36 AM

To create a tabulation delimited file from a dataframe, the best option is to use the .to_csv() method while specifying the delimiter character:

myDataframe.to_csv('filename.tsv', sep = '\t')

Answer by Answiki on 06/14/2020 at 06:34:41 AM

To create a tabulation delimited file from a dataframe, the best option is to use the .to_csv() method w hile specifying the delimiter character:

myDataframe.to_csv('filename.tsv', sep = '\t')

Answer by Answiki on 06/13/2020 at 10:32:34 PM

To create a tabulation delimited file from a dataframe, the bes t option is to use the .to_csv() method w hile specifying the delimiter character:

myDataframe.to_csv('filename.tsv', sep = '\t')

Question by Answiki 06/13/2020 at 10:30:44 PM
How to save a DataFrame in a tabulation delimited file (.tsv) in Python?
# ID Query URL Count

Icons proudly provided by Friconix.