-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
Closed
Labels
API DesignDuplicate ReportDuplicate issue or pull requestDuplicate issue or pull requestIO CSVread_csv, to_csvread_csv, to_csv
Description
From discussion started in #22639:
Currently, pd.read_csv has two booleans
- error_bad_lines : boolean, default True
Lines with too many fields (e.g. a csv line with too many commas) will by default cause an exception to be raised, and no DataFrame will be returned. If False, then these “bad lines” will dropped from the DataFrame that is returned. - warn_bad_lines : boolean, default True
If error_bad_lines is False, and warn_bad_lines is True, a warning for each “bad line” will be output.
This is confusing (what happens if both are True), and not in line with other errors-kwargs that are all around the place. Clearer would be something like: error_bad_lines = {'raise'|'warn'|'ignore'}, and removing warn_bad_lines.
devrimcavusoglu
Metadata
Metadata
Assignees
Labels
API DesignDuplicate ReportDuplicate issue or pull requestDuplicate issue or pull requestIO CSVread_csv, to_csvread_csv, to_csv