From 28c346385ef96912f8b8b0e2f080c07293c67122 Mon Sep 17 00:00:00 2001 From: Bharat123rox Date: Tue, 24 Mar 2020 19:42:38 +0530 Subject: [PATCH] [DOC]: Mention default behaviour of index_col in readcsv --- doc/source/user_guide/io.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/source/user_guide/io.rst b/doc/source/user_guide/io.rst index f3aff0654530e..11103b36079f7 100644 --- a/doc/source/user_guide/io.rst +++ b/doc/source/user_guide/io.rst @@ -109,6 +109,11 @@ index_col : int, str, sequence of int / str, or False, default ``None`` Note: ``index_col=False`` can be used to force pandas to *not* use the first column as the index, e.g. when you have a malformed file with delimiters at the end of each line. + + The default value of ``None`` instructs pandas to guess. If the number of + fields in the column header row is equal to the number of fields in the body + of the data file, then a default index is used. If it is one larger, then + the first field is used as an index. usecols : list-like or callable, default ``None`` Return a subset of the columns. If list-like, all elements must either be positional (i.e. integer indices into the document columns) or strings