Common causes
1. A delimiter inside an unquoted value
Addresses, numbers with thousands separators and free text often contain commas. Any field that contains the delimiter must be wrapped in double quotes.
id,name,city
2,Grace,New York, NYid,name,city
2,Grace,"New York, NY"2. A missing value at the end of a row
Empty trailing fields still need their commas. A row that stops early has fewer fields than the header.
id,name,city
3,Linusid,name,city
3,Linus,3. The wrong delimiter
Excel in many European locales saves “CSV” with semicolons because the comma is the decimal separator. A comma-based reader then sees one field per row, or splits decimals. Tell the reader the delimiter (sep=";" in pandas); PasteKit detects it automatically.
id;name;price
1;Ada;3,50id,name,price
1,Ada,"3,50"4. Title or notes above the header
Report exports often start with a title line or a blank line, so the first “row” has one field and every data row looks too long. Remove the preamble, or skip it (skiprows=1 in pandas).
Sales report 2026
id,name
1,Adaid,name
1,AdaFrequently asked questions
Which line is "line 3" in the pandas message?
pandas counts physical lines from 1, including the header. Quoted fields that span lines shift the count, so look at the row content PasteKit highlights rather than counting by hand.
How do I skip bad rows instead of failing?
In pandas 1.3 and later, pass on_bad_lines=“skip” (or “warn”). Skipped rows are lost silently, so prefer fixing the quoting when you can.
Is a ragged CSV file invalid?
RFC 4180 says each line should contain the same number of fields. Some tools accept ragged rows, but any import into a database table needs consistent columns.