Skip to content

DOC: read_excel - improve parse_cols docstring #16580

Closed
@BLMeltdown

Description

@BLMeltdown

http://pandas.pydata.org/pandas-docs/stable/generated/pandas.read_excel.html#pandas.read_excel

"parse_cols : int or list, default None

    If None then parse all columns,
    If int then indicates last column to be parsed
    If list of ints then indicates list of column numbers to be parsed
    If string then indicates comma separated list of column names and column ranges (e.g. “A:E” or “A,C,E:F”)

"

I think the formulation "column names" is ambiguous, as it can refer to "columns letters" or "columns header", because of Excel terminology.
"Column names" as "headers" actually don't work as entries for this function.

In addition, slices don't work as usual, as they include the last column of the slice. This is unexpected behavior given the usual python slicing modus operandi, and if it is not changed, it should be at least documented (I feel like it should be both, as we should stay true to language syntax and document it as it can be confusing, as A:D in vba/excel language includes D).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions