Skip to content

Commit 8c9061b

Browse files
committed
ENH: Raise error for read_excel possible "sheet" argument in kwargs (#17994)
1 parent 0e16818 commit 8c9061b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pandas/io/excel.py

+3
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,9 @@ def read_excel(io, sheet_name=0, header=0, skiprows=None, skip_footer=0,
225225
elif 'sheetname' in kwds:
226226
raise TypeError("Cannot specify both `sheet_name` and `sheetname`. "
227227
"Use just `sheet_name`")
228+
if 'sheet' in kwds:
229+
raise TypeError("read_excel() got an unexpected keyword argument "
230+
"`sheet`")
228231

229232
if not isinstance(io, ExcelFile):
230233
io = ExcelFile(io, engine=engine)

0 commit comments

Comments
 (0)