@@ -408,30 +408,32 @@ class _read_shared(TypedDict, Generic[HashableT], total=False):
408408 documentation for more details.
409409on_bad_lines : {{'error', 'warn', 'skip'}} or Callable, default 'error'
410410 Specifies what to do upon encountering a bad line (a line with too many fields).
411- Allowed values are :
411+ Allowed values are:
412412
413413 - ``'error'``, raise an Exception when a bad line is encountered.
414414 - ``'warn'``, raise a warning when a bad line is encountered and skip that line.
415415 - ``'skip'``, skip bad lines without raising or warning when they are encountered.
416+ - Callable, function that will process a single bad line.
417+ - With ``engine='python'``, function with signature
418+ ``(bad_line: list[str]) -> list[str] | None``.
419+ ``bad_line`` is a list of strings split by the ``sep``.
420+ If the function returns ``None``, the bad line will be ignored.
421+ If the function returns a new ``list`` of strings with more elements than
422+ expected, a ``ParserWarning`` will be emitted while dropping extra elements.
423+ - With ``engine='pyarrow'``, function with signature
424+ as described in `pyarrow documentation
425+ <https://arrow.apache.org/docs/python/generated/pyarrow.csv.ParseOptions.html
426+ #pyarrow.csv.ParseOptions.invalid_row_handler>`_.
416427
417428 .. versionadded:: 1.3.0
418429
419430 .. versionadded:: 1.4.0
420431
421- - Callable, function with signature
422- ``(bad_line: list[str]) -> list[str] | None`` that will process a single
423- bad line. ``bad_line`` is a list of strings split by the ``sep``.
424- If the function returns ``None``, the bad line will be ignored.
425- If the function returns a new ``list`` of strings with more elements than
426- expected, a ``ParserWarning`` will be emitted while dropping extra elements.
427- Only supported when ``engine='python'``
432+ Callable
428433
429434 .. versionchanged:: 2.2.0
430435
431- - Callable, function with signature
432- as described in `pyarrow documentation
433- <https://arrow.apache.org/docs/python/generated/pyarrow.csv.ParseOptions.html
434- #pyarrow.csv.ParseOptions.invalid_row_handler>`_ when ``engine='pyarrow'``
436+ Callable for ``engine='pyarrow'``
435437
436438delim_whitespace : bool, default False
437439 Specifies whether or not whitespace (e.g. ``' '`` or ``'\\ t'``) will be
0 commit comments