Skip to content

ENH: support none in header list  #37625

@ShaneKao

Description

@ShaneKao

I have a file with two sheets, one has a header, and another hasn't.
The following code will raise TypeError: list indices must be integers or slices, not NoneType.

# Your code here, if applicable
df = pd.read_excel(file_path, sheet_name=None, header=[0, None])

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementIO Excelread_excel, to_excelNeeds DiscussionRequires discussion from core team before further action

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions