My csv file looks like this:
"City","Name","Comment"
"A","Jay","Like it"
"B","Rosy","Well, good"
...
"K","Anna","Works "fine""
The expected output(dataframe):
City,Name,Comment
A,Jay,'Like it'
B,Rosy,'Well, good'
...
K,Anna,'Works "fine"'
I am trying to read it by doing this :
df=pd.read_csv("test.csv", sep=',', engine='python',encoding='utf8', quoting=csv.QUOTE_ALL)
And it is giving error like this :
ParserError: unexpected end of data
I need to have all the data. So I can not skip any lines with error_bad_lines=True
.
How I can fix this issue?
UPDATE: It turns out my original CSV file is missing a quote at the end of the file. I solved the problem by identifying the errors in the file and modifying them.