Skip to content

Commit 1edae5e

Browse files
committed
fix regression for reading s3 files
1 parent cdd627f commit 1edae5e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pandas/io/excel/_xlrd.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from datetime import time
22
from distutils.version import LooseVersion
3-
from io import BufferedReader, BytesIO
43

54
import numpy as np
65

@@ -37,7 +36,7 @@ def _workbook_class(self):
3736

3837
def load_workbook(self, filepath_or_buffer):
3938
from xlrd import open_workbook
40-
if isinstance(filepath_or_buffer, (BytesIO, BufferedReader)):
39+
if hasattr(filepath_or_buffer, "read"):
4140
data = filepath_or_buffer.read()
4241
return open_workbook(file_contents=data)
4342
else:

0 commit comments

Comments
 (0)