Data science journey
Jun 26, 2021
How I solved the error tokenizing data while reading the CSV file
Parser Error: Error tokenizing data. C error: Expected 1 fields in line 4, saw 2
A CSV (comma-separated values) file is a text file that has a specific format that allows data to be saved in a table structured format
I opened this file in notepad and seen those values were not comma separated
- Firstly opened this file in Excel and saved it as
2. After saving in CSV (comma delimited) format, I opened this file in notepad and it was looking like
3. Used this file in python and it solved the error.