We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cdd627f commit 1edae5eCopy full SHA for 1edae5e
pandas/io/excel/_xlrd.py
@@ -1,6 +1,5 @@
1
from datetime import time
2
from distutils.version import LooseVersion
3
-from io import BufferedReader, BytesIO
4
5
import numpy as np
6
@@ -37,7 +36,7 @@ def _workbook_class(self):
37
36
38
def load_workbook(self, filepath_or_buffer):
39
from xlrd import open_workbook
40
- if isinstance(filepath_or_buffer, (BytesIO, BufferedReader)):
+ if hasattr(filepath_or_buffer, "read"):
41
data = filepath_or_buffer.read()
42
return open_workbook(file_contents=data)
43
else:
0 commit comments