-
-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Closed
Labels
Error ReportingIncorrect or improved errors from pandasIncorrect or improved errors from pandasIO CSVread_csv, to_csvread_csv, to_csv
Milestone
Description
On master
(b722222):
>>> data = 'a,,b\n1,,a\n2,,"2,,b"'
>>> read_csv(StringIO(data), sep=',,', engine='python')
...
ValueError: Expected 2 fields in line 3, saw 3
I expect this command to work, but because no parsing is done on quoted fields as can be seen here, an extra field is produced, breaking the parser. Note that this does not affect the C parser because multi-char delimiters are not supported. Similar to what we saw in #10911 and #12775, but unless we want to write the tokenizer.c
code in Python, a similar fix does not seem trivial.
Metadata
Metadata
Assignees
Labels
Error ReportingIncorrect or improved errors from pandasIncorrect or improved errors from pandasIO CSVread_csv, to_csvread_csv, to_csv