Skip to content

Commit 22e24bb

Browse files
committed
remove _engine keyword altogether
1 parent ddcaad8 commit 22e24bb

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

pandas/io/excel/_xlrd.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ def __init__(self, filepath_or_buffer):
2828
raise ImportError(err_msg +
2929
". Current version " + xlrd.__VERSION__)
3030

31-
self._engine = xlrd
3231
super().__init__(filepath_or_buffer)
3332

3433
@property
@@ -37,12 +36,12 @@ def _workbook_class(self):
3736
return Book
3837

3938
def load_workbook(self, filepath_or_buffer):
40-
39+
from xlrd import open_workbook
4140
if isinstance(filepath_or_buffer, (BytesIO, BufferedReader)):
4241
data = filepath_or_buffer.read()
43-
return self._engine.open_workbook(file_contents=data)
42+
return open_workbook(file_contents=data)
4443
else:
45-
return self._engine.open_workbook(filepath_or_buffer)
44+
return open_workbook(filepath_or_buffer)
4645

4746
@property
4847
def sheet_names(self):

0 commit comments

Comments
 (0)