pythonpandasdataframe

How to read a .tsf file to a dataframe in python pandas?


I have a .tsf file.

I want to read it to a dataframe in pandas through a specified path.

How can i do that??


Solution

  • If you by TSF refer to Tab Separated Fields, then you need to use the pandas.read_csv('filename.tsf', sep='\t')

    The sep='\t' will tell pandas that the fields are separated by tabs.