Common causes
1. A missing closing quote
A field opened with " but never closed swallows every following row. Add the closing quote at the end of the value.
id,name,comment
1,Ada,"Great service
2,Grace,Late deliveryid,name,comment
1,Ada,"Great service"
2,Grace,Late delivery2. Quotes inside a quoted field escaped with a backslash
CSV escapes a quote inside a quoted field by doubling it (""), not with \". MySQL SELECT INTO OUTFILE and some hand-written exporters use backslashes, which standard readers misread as the end of the field.
id,quote
1,"He said \"hi\""id,quote
1,"He said ""hi"""3. A quote character used as inches or a typographic mark
A field that begins with a quote, like "27" monitor, is read as a quoted field that ends after 27. Quote the whole value and double the inner quote.
id,size,note
1,"27" monitor",okid,size,note
1,"27"" monitor",ok4. A file truncated in the middle of a quoted field
Downloads and exports that stop early can cut a multi-line quoted field in half. Re-export the file, or remove the incomplete last row.
id,notes
1,"Shipped
2,"Pending reviewid,notes
1,"Shipped"
2,"Pending review"Frequently asked questions
Why does pandas report a row far from the problem?
The “starting at row” number is where the unclosed quoted field began, counted from the first data row in some versions. Everything after it was swallowed into that field, so the start row is the one to inspect.
Can I tell pandas to ignore quotes?
Passing quoting=csv.QUOTE_NONE makes quotes ordinary characters, which avoids the error but splits any quoted field that contains a comma. Fixing the quoting in the source is safer.
Are line breaks allowed inside CSV fields?
Yes, inside a quoted field. That is exactly why an unclosed quote is so disruptive: the parser has no way to know the line break was not meant to be part of the value.