Skip to content

Commit b86cd92

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

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pandas/io/excel.py

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

229231
if not isinstance(io, ExcelFile):
230232
io = ExcelFile(io, engine=engine)

0 commit comments

Comments
 (0)