From fbd95cf60c28df6067677377f4c2fba126069412 Mon Sep 17 00:00:00 2001 From: Toroi0610 Date: Tue, 9 May 2023 21:56:56 +0900 Subject: [PATCH] docs: #53035 clarify the behavior of sep=None. --- pandas/io/parsers/readers.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pandas/io/parsers/readers.py b/pandas/io/parsers/readers.py index 8b2a02f0ac63a..ad9e5b646371e 100644 --- a/pandas/io/parsers/readers.py +++ b/pandas/io/parsers/readers.py @@ -103,11 +103,12 @@ sep : str, default {_default_sep} Delimiter to use. If sep is None, the C engine cannot automatically detect the separator, but the Python parsing engine can, meaning the latter will - be used and automatically detect the separator by Python's builtin sniffer - tool, ``csv.Sniffer``. In addition, separators longer than 1 character and - different from ``'\s+'`` will be interpreted as regular expressions and - will also force the use of the Python parsing engine. Note that regex - delimiters are prone to ignoring quoted data. Regex example: ``'\r\t'``. + be used and automatically detect the separator from only the first valid + row of the file by Python's builtin sniffer tool, ``csv.Sniffer``. + In addition, separators longer than 1 character and different from + ``'\s+'`` will be interpreted as regular expressions and will also force + the use of the Python parsing engine. Note that regex delimiters are prone + to ignoring quoted data. Regex example: ``'\r\t'``. delimiter : str, default ``None`` Alias for sep. header : int, list of int, None, default 'infer'