Skip to content

Commit 3ad2110

Browse files
bharatr21jbrockmendel
authored andcommitted
[DOC]: Mention default behaviour of index_col in readcsv (pandas-dev#32977)
1 parent 362e86c commit 3ad2110

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

doc/source/user_guide/io.rst

+5
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,11 @@ index_col : int, str, sequence of int / str, or False, default ``None``
109109
Note: ``index_col=False`` can be used to force pandas to *not* use the first
110110
column as the index, e.g. when you have a malformed file with delimiters at
111111
the end of each line.
112+
113+
The default value of ``None`` instructs pandas to guess. If the number of
114+
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.
112117
usecols : list-like or callable, default ``None``
113118
Return a subset of the columns. If list-like, all elements must either
114119
be positional (i.e. integer indices into the document columns) or strings

0 commit comments

Comments
 (0)