From dbb048254243b521cd252a93b668dd840ce9fdde Mon Sep 17 00:00:00 2001 From: Steven Bamford Date: Wed, 19 Jan 2022 09:23:57 +0000 Subject: [PATCH] Small doc fix to `usecols` argument Remove int option from list (c.f. #29795) and clarify 0-indexing. --- pandas/io/excel/_base.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pandas/io/excel/_base.py b/pandas/io/excel/_base.py index bf2d6f0b27e41..f159228b94545 100644 --- a/pandas/io/excel/_base.py +++ b/pandas/io/excel/_base.py @@ -119,12 +119,13 @@ those columns will be combined into a ``MultiIndex``. If a subset of data is selected with ``usecols``, index_col is based on the subset. -usecols : int, str, list-like, or callable default None +usecols : str, list-like, or callable, default None * If None, then parse all columns. * If str, then indicates comma separated list of Excel column letters and column ranges (e.g. "A:E" or "A,C,E:F"). Ranges are inclusive of both sides. - * If list of int, then indicates list of column numbers to be parsed. + * If list of int, then indicates list of column numbers to be parsed + (0-indexed). * If list of string, then indicates list of column names to be parsed. * If callable, then evaluate each column name against it and parse the column if the callable returns ``True``.