Skip to content

Commit 1b893df

Browse files
committed
CLN: removed error/warning raising process from read_excel
* removed error/warning raising process from read_excel * changed calling method from ExcelFile._parse_excel to ExcelFile.parse, which calls _parse_excel and raises the same error/warning Related issue: pandas-dev#20920
1 parent 8f53f18 commit 1b893df

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

pandas/io/excel.py

+1-10
Original file line numberDiff line numberDiff line change
@@ -303,19 +303,10 @@ def read_excel(io,
303303
convert_float=True,
304304
**kwds):
305305

306-
# Can't use _deprecate_kwarg since sheetname=None has a special meaning
307-
if is_integer(sheet_name) and sheet_name == 0 and 'sheetname' in kwds:
308-
warnings.warn("The `sheetname` keyword is deprecated, use "
309-
"`sheet_name` instead", FutureWarning, stacklevel=2)
310-
sheet_name = kwds.pop("sheetname")
311-
elif 'sheetname' in kwds:
312-
raise TypeError("Cannot specify both `sheet_name` and `sheetname`. "
313-
"Use just `sheet_name`")
314-
315306
if not isinstance(io, ExcelFile):
316307
io = ExcelFile(io, engine=engine)
317308

318-
return io._parse_excel(
309+
return io.parse(
319310
sheet_name=sheet_name,
320311
header=header,
321312
names=names,

0 commit comments

Comments
 (0)