@@ -142,8 +142,7 @@ class _read_shared(TypedDict, Generic[HashableT], total=False):
142
142
_read_shared = dict
143
143
144
144
145
- _doc_read_csv_and_table = (
146
- r"""
145
+ _doc_read_csv_and_table = r"""
147
146
{summary}
148
147
149
148
Also supports optionally iterating or breaking of the file
@@ -272,10 +271,7 @@ class _read_shared(TypedDict, Generic[HashableT], total=False):
272
271
na_values : Hashable, Iterable of Hashable or dict of {{Hashable : Iterable}}, optional
273
272
Additional strings to recognize as ``NA``/``NaN``. If ``dict`` passed, specific
274
273
per-column ``NA`` values. By default the following values are interpreted as
275
- ``NaN``: " """
276
- + fill ('", "' .join (sorted (STR_NA_VALUES )), 70 , subsequent_indent = " " )
277
- + """ ".
278
-
274
+ ``NaN``: "{na_values_str}".
279
275
keep_default_na : bool, default True
280
276
Whether or not to include the default ``NaN`` values when parsing the data.
281
277
Depending on whether ``na_values`` is passed in, the behavior is as follows:
@@ -357,8 +353,7 @@ class _read_shared(TypedDict, Generic[HashableT], total=False):
357
353
quotechar : str (length 1), optional
358
354
Character used to denote the start and end of a quoted item. Quoted
359
355
items can include the ``delimiter`` and it will be ignored.
360
- quoting : {{0 or csv.QUOTE_MINIMAL, 1 or csv.QUOTE_ALL, 2 or csv.QUOTE_NONNUMERIC, \
361
- 3 or csv.QUOTE_NONE}}, default csv.QUOTE_MINIMAL
356
+ quoting : {{0 or csv.QUOTE_MINIMAL, 1 or csv.QUOTE_ALL, 2 or csv.QUOTE_NONNUMERIC, 3 or csv.QUOTE_NONE}}, default csv.QUOTE_MINIMAL
362
357
Control field quoting behavior per ``csv.QUOTE_*`` constants. Default is
363
358
``csv.QUOTE_MINIMAL`` (i.e., 0) which implies that only fields containing special
364
359
characters are quoted (e.g., characters defined in ``quotechar``, ``delimiter``,
@@ -544,8 +539,7 @@ class _read_shared(TypedDict, Generic[HashableT], total=False):
544
539
col 2 datetime64[ns]
545
540
col 3 datetime64[ns]
546
541
dtype: object
547
- """
548
- )
542
+ """ # noqa: E501
549
543
550
544
551
545
class _C_Parser_Defaults (TypedDict ):
@@ -756,6 +750,9 @@ def read_csv(
756
750
summary = "Read a comma-separated values (csv) file into DataFrame." ,
757
751
see_also_func_name = "read_table" ,
758
752
see_also_func_summary = "Read general delimited file into DataFrame." ,
753
+ na_values_str = fill (
754
+ '", "' .join (sorted (STR_NA_VALUES )), 70 , subsequent_indent = " "
755
+ ),
759
756
_default_sep = "','" ,
760
757
storage_options = _shared_docs ["storage_options" ],
761
758
decompression_options = _shared_docs ["decompression_options" ]
@@ -888,6 +885,9 @@ def read_table(
888
885
see_also_func_summary = (
889
886
"Read a comma-separated values (csv) file into DataFrame."
890
887
),
888
+ na_values_str = fill (
889
+ '", "' .join (sorted (STR_NA_VALUES )), 70 , subsequent_indent = " "
890
+ ),
891
891
_default_sep = r"'\\t' (tab-stop)" ,
892
892
storage_options = _shared_docs ["storage_options" ],
893
893
decompression_options = _shared_docs ["decompression_options" ]
0 commit comments