You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
From discussion started in #22639:
Currently,
pd.read_csv
has two booleansLines 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.
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 othererrors
-kwargs that are all around the place. Clearer would be something like:error_bad_lines = {'raise'|'warn'|'ignore'}
, and removingwarn_bad_lines
.The text was updated successfully, but these errors were encountered: