Skip to content

Commit 5d745bc

Browse files
authored
DOC: Clarify index_col behavior for read_csv (pandas-dev#39006)
1 parent 3d80244 commit 5d745bc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

doc/source/user_guide/io.rst

+3-2
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,9 @@ index_col : int, str, sequence of int / str, or False, default ``None``
112112

113113
The default value of ``None`` instructs pandas to guess. If the number of
114114
fields in the column header row is equal to the number of fields in the body
115-
of the data file, then a default index is used. If it is one larger, then
116-
the first field is used as an index.
115+
of the data file, then a default index is used. If it is larger, then
116+
the first columns are used as index so that the remaining number of fields in
117+
the body are equal to the number of fields in the header.
117118
usecols : list-like or callable, default ``None``
118119
Return a subset of the columns. If list-like, all elements must either
119120
be positional (i.e. integer indices into the document columns) or strings

0 commit comments

Comments
 (0)