0

I have got dataset named train.tsv.7z and test.tsv.7z. I unzip them in my Mac with unarchiver (double click) so I have the train.tsv and test.tsv now.

Then I am reading those files with pandas using

PATH='data/projData/'
tables = pd.read_table(PATH)

But I am getting error

ParserError: Error tokenizing data. C error: Calling read(nbytes) on source failed. Try engine='python'.

Looking into other stackoverflow thread, it seems the error is due to the file being corrupted. But not sure how to solve this issue.

I am using python3.6 conda environment

1 Answer 1

1

It doesn't work this way.

You have to specify a single file (not a directory):

train = pd.read_csv('data/projData/train.tsv', sep='\t')
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.