import tsv as dataframe python 1

import tsv as dataframe python

# import tsv file into pandas

import pandas as pd

# Use an argument to pass in the name of the tsv file
qa_file = sys.argv[1]

# Read in the tsv file with pandas. The separator is a tab
qa=pd.read_csv(qa_file,sep="\t")

Here is what the above code is Doing:
1. Import the sys module
2. Import the pandas module
3. Use an argument to pass in the name of the tsv file
4. Read in the tsv file with pandas. The separator is a tab

Similar Posts