Skip to content

Commit 8fa430b

Browse files
committed
GH17483 More 'infer' keyword documentation
1 parent 7e26b60 commit 8fa430b

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

doc/source/io.rst

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,19 @@ Column and Index Locations and Names
103103
++++++++++++++++++++++++++++++++++++
104104

105105
header : int or list of ints, default ``'infer'``
106-
Row number(s) to use as the column names, and the start of the data. Default
107-
behavior is as if ``header=0`` if no ``names`` passed, otherwise as if
108-
``header=None``. Explicitly pass ``header=0`` to be able to replace existing
109-
names. The header can be a list of ints that specify row locations for a
110-
multi-index on the columns e.g. ``[0,1,3]``. Intervening rows that are not
111-
specified will be skipped (e.g. 2 in this example is skipped). Note that
112-
this parameter ignores commented lines and empty lines if
113-
``skip_blank_lines=True``, so header=0 denotes the first line of data
114-
rather than the first line of the file.
106+
Row number(s) to use as the column names, and the start of the
107+
data. Default behavior is to infer the column names: if no names are
108+
passed the behavior is identical to ``header=0`` and column names
109+
are inferred from the first line of the file, if column names are
110+
passed explicitly then the behavior is identical to
111+
``header=None``. Explicitly pass ``header=0`` to be able to replace
112+
existing names. The header can be a list of ints that specify row
113+
locations for a multi-index on the columns
114+
e.g. ``[0,1,3]``. Intervening rows that are not specified will be
115+
skipped (e.g. 2 in this example is skipped). Note that this
116+
parameter ignores commented lines and empty lines if
117+
``skip_blank_lines=True``, so header=0 denotes the first line of
118+
data rather than the first line of the file.
115119
names : array-like, default ``None``
116120
List of column names to use. If file contains no header row, then you should
117121
explicitly pass ``header=None``. Duplicates in this list will cause

0 commit comments

Comments
 (0)