Skip to content

Commit 19ee18f

Browse files
committed
COMPAT: Need to read Bytes on Python
1 parent ff090f4 commit 19ee18f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/io/common.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import zipfile
66
from contextlib import contextmanager, closing
77

8-
from pandas.compat import StringIO, string_types
8+
from pandas.compat import StringIO, string_types, BytesIO
99
from pandas import compat
1010

1111

@@ -154,7 +154,7 @@ def get_filepath_or_buffer(filepath_or_buffer, encoding=None):
154154
b = conn.get_bucket(parsed_url.netloc)
155155
k = boto.s3.key.Key(b)
156156
k.key = parsed_url.path
157-
filepath_or_buffer = StringIO(k.get_contents_as_string())
157+
filepath_or_buffer = BytesIO(k.get_contents_as_string())
158158
return filepath_or_buffer, None
159159

160160

0 commit comments

Comments
 (0)