Skip to content

Commit c273d9b

Browse files
committed
DOC: Add the document about how PythonParser sniffing the separator
1 parent 73144f5 commit c273d9b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

doc/source/io.rst

+2-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ filepath_or_buffer : various
8484
sep : str, defaults to ``','`` for :func:`read_csv`, ``\t`` for :func:`read_table`
8585
Delimiter to use. If sep is ``None``, the C engine cannot automatically detect
8686
the separator, but the Python parsing engine can, meaning the latter will be
87-
used automatically. In addition, separators longer than 1 character and
87+
used and automatically detect the separator by Python's builtin sniffer tool,
88+
:class:`python:csv.Sniffer`. In addition, separators longer than 1 character and
8889
different from ``'\s+'`` will be interpreted as regular expressions and
8990
will also force the use of the Python parsing engine. Note that regex
9091
delimiters are prone to ignoring quoted data. Regex example: ``'\\r\\t'``.

pandas/io/parsers.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,8 @@
311311
_sep_doc = r"""sep : str, default {default}
312312
Delimiter to use. If sep is None, the C engine cannot automatically detect
313313
the separator, but the Python parsing engine can, meaning the latter will
314-
be used automatically. In addition, separators longer than 1 character and
314+
be used and automatically detect the separator by Python's builtin sniffer
315+
tool, ``csv.Sniffer``. In addition, separators longer than 1 character and
315316
different from ``'\s+'`` will be interpreted as regular expressions and
316317
will also force the use of the Python parsing engine. Note that regex
317318
delimiters are prone to ignoring quoted data. Regex example: ``'\r\t'``

0 commit comments

Comments
 (0)