Skip to content

Commit 8dd57ed

Browse files
committed
Update readers.py
1 parent ad2b0ce commit 8dd57ed

File tree

1 file changed

+29
-18
lines changed

1 file changed

+29
-18
lines changed

pandas/io/parsers/readers.py

Lines changed: 29 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -463,14 +463,14 @@ def read_csv(
463463
then you should explicitly pass ``header=0`` to override the column names.
464464
Duplicates in this list are not allowed.
465465
index_col : Hashable, Sequence of Hashable or False, optional
466-
Column(s) to use as row label(s), denoted either by column labels or column
467-
indices. If a sequence of labels or indices is given,
468-
:class:`~pandas.MultiIndex`
469-
will be formed for the row labels.
470-
471-
Note: ``index_col=False`` can be used to force pandas to *not* use the first
472-
column as the index, e.g., when you have a malformed file with delimiters at
473-
the end of each line.
466+
Column(s) to use as row label(s), denoted either by column labels or column
467+
indices. If a sequence of labels or indices is given,
468+
:class:`~pandas.MultiIndex`
469+
will be formed for the row labels.
470+
471+
Note: ``index_col=False`` can be used to force pandas to *not* use the first
472+
column as the index, e.g., when you have a malformed file with delimiters at
473+
the end of each line.
474474
usecols : Sequence of Hashable or Callable, optional
475475
Subset of columns to select, denoted either
476476
by column labels or column indices.
@@ -733,6 +733,12 @@ def read_csv(
733733
/generated/pyarrow.csv.ParseOptions.html
734734
#pyarrow.csv.ParseOptions.invalid_row_handler>`_.
735735
736+
.. versionadded:: 1.3.0
737+
738+
.. versionadded:: 1.4.0
739+
740+
Callable
741+
736742
.. versionchanged:: 2.2.0
737743
738744
Callable for ``engine='pyarrow'``
@@ -1045,14 +1051,13 @@ def read_table(
10451051
then you should explicitly pass ``header=0`` to override the column names.
10461052
Duplicates in this list are not allowed.
10471053
index_col : Hashable, Sequence of Hashable or False, optional
1048-
Column(s) to use as row label(s), denoted either by column labels or column
1049-
indices. If a sequence of labels or indices is given,
1050-
:class:`~pandas.MultiIndex`
1051-
will be formed for the row labels.
1052-
1053-
Note: ``index_col=False`` can be used to force pandas to *not* use the first
1054-
column as the index, e.g., when you have a malformed file with delimiters at
1055-
the end of each line.
1054+
Column(s) to use as row label(s), denoted either by column labels or column
1055+
indices. If a sequence of labels or indices is given, :class:`~pandas.MultiIndex`
1056+
will be formed for the row labels.
1057+
1058+
Note: ``index_col=False`` can be used to force pandas to *not* use the first
1059+
column as the index, e.g., when you have a malformed file with delimiters at
1060+
the end of each line.
10561061
usecols : Sequence of Hashable or Callable, optional
10571062
Subset of columns to select, denoted either by column labels or column indices.
10581063
If list-like, all elements must either
@@ -1312,7 +1317,13 @@ def read_table(
13121317
python/generated/pyarrow.csv.ParseOptions.html
13131318
#pyarrow.csv.ParseOptions.invalid_row_handler>`_.
13141319
1315-
.. versionadded:: 2.2.0
1320+
.. versionadded:: 1.3.0
1321+
1322+
.. versionadded:: 1.4.0
1323+
1324+
Callable
1325+
1326+
.. versionchanged:: 2.2.0
13161327
13171328
Callable for ``engine='pyarrow'``
13181329
@@ -2417,4 +2428,4 @@ def _validate_skipfooter(kwds: dict[str, Any]) -> None:
24172428
if kwds.get("iterator") or kwds.get("chunksize"):
24182429
raise ValueError("'skipfooter' not supported for iteration")
24192430
if kwds.get("nrows"):
2420-
raise ValueError("'skipfooter' not supported with 'nrows'")
2431+
raise ValueError("'skipfooter' not supported with 'nrows'")

0 commit comments

Comments
 (0)