Skip to content

Commit 67857a1

Browse files
author
y-p
committed
Merge pull request #5337 from lexual/read_csv_docs_add_error_bad_lines
Docs for error_bad_lines, and warn_bad_lines options to pd.read_*
2 parents 74df101 + d53ba13 commit 67857a1

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
@@ -134,6 +134,14 @@
134134
tupleize_cols: boolean, default False
135135
Leave a list of tuples on columns as is (default is to convert to
136136
a Multi Index on the columns)
137+
error_bad_lines: boolean, default True
138+
Lines with too many fields (e.g. a csv line with too many commas) will by
139+
default cause an exception to be raised, and no DataFrame will be returned.
140+
If False, then these "bad lines" will dropped from the DataFrame that is
141+
returned. (Only valid with C parser).
142+
warn_bad_lines: boolean, default True
143+
If error_bad_lines is False, and warn_bad_lines is True, a warning for each
144+
"bad line" will be output. (Only valid with C parser).
137145
138146
Returns
139147
-------

0 commit comments

Comments
 (0)