Skip to content

Commit d53ba13

Browse files
committed
Docs for error_bad_lines, and warn_bad_lines options to pd.read_*
1 parent 142d184 commit d53ba13

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pandas/io/parsers.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,14 @@
133133
tupleize_cols: boolean, default False
134134
Leave a list of tuples on columns as is (default is to convert to
135135
a Multi Index on the columns)
136+
error_bad_lines: boolean, default True
137+
Lines with too many fields (e.g. a csv line with too many commas) will by
138+
default cause an exception to be raised, and no DataFrame will be returned.
139+
If False, then these "bad lines" will dropped from the DataFrame that is
140+
returned. (Only valid with C parser).
141+
warn_bad_lines: boolean, default True
142+
If error_bad_lines is False, and warn_bad_lines is True, a warning for each
143+
"bad line" will be output. (Only valid with C parser).
136144
137145
Returns
138146
-------

0 commit comments

Comments
 (0)