Data science journey

Chothe P P
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

  1. Firstly opened this file in Excel and saved it as
CSV (comma delimited)

2. After saving in CSV (comma delimited) format, I opened this file in notepad and it was looking like

CSV (comma delimited) file opened in notepad

3. Used this file in python and it solved the error.

CSV file read in Python

--

--