Skip to content

read_excel does not raise error with wrong keyword arg #17994

Closed
@lucianoviola

Description

@lucianoviola

For example:

pd.read_excel('file_name.xlsx',sheet='mysheet')

does not raise any error. The right parameter name is "sheetname" . If "sheet" is passed it defaults to the first sheet and no error is raised.

sheetname and sheet are very similar and easy to confuse.

One might think that it is reading the sheet passed as argument when in fact it is another one.

I would like to suggest for errors to be raised if unexpected args are passed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Error ReportingIncorrect or improved errors from pandasIO Excelread_excel, to_excel

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions