This parser hand-rolls CSV with line.split(",") — and a comma inside a quoted value shreds the row into 4 fields. Fix it to use the csv module so the quoted field survives intact (3 fields).
The break is on line 3 — but read the whole snippet first.
This parser hand-rolls CSV with line.split(",") — and a comma inside a quoted value shreds the row into 4 fields. Fix it to use the csv module so the quoted field survives intact (3 fields).