Error when trying to open csv in google colab; Jupyter works well

15 views Asked by At

I can not read this csv file: https://drive.google.com/file/d/1Q3lCw_8Uad_OzHCjvLeYRvamXR74UPbW/view

I've downloaded it and now I am trying to read it using read_csv function.

  1. dataset = pd.read_csv("salary_dataset.csv") gets ParserError: Error tokenizing data. C error: EOF inside string starting at row 121535
  2. then I try to do dataset = pd.read_csv("salary_dataset.csv", quoting=csv.QUOTE_NONE) and I get ParserError: Error tokenizing data. C error: Expected 5 fields in line 3, saw 6
  3. then I try dataset = pd.read_csv("salary_dataset.csv", quoting=csv.QUOTE_NONE, sep='\t'). now it does not give en error, but I get one mixed column "FullDescription,SalaryNormalized" but it should be two different columns with different values - FullDescription and SalaryNormalized... So it does not parse the comma
  4. but when I try dataset = pd.read_csv("salary_dataset.csv", quoting=csv.QUOTE_NONE, sep=',') I get error ParserError: Error tokenizing data. C error: Expected 5 fields in line 3, saw 6

meanwhile, everything works fine in Jupyter Lab just with simple pd.read_csv("salary_dataset.csv")... Unfortunately, I need to use Colab because of GPU, please help me out how I can open this csv!

0

There are 0 answers