Skip to content

COMPAT: Need to read Bytes on Python #9230

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 12, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/source/whatsnew/v0.16.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ Bug Fixes

.. _whatsnew_0160.bug_fixes:

- Fixed issue using `read_csv` on s3 with Python 3.
- Fixed compatibility issue in ``DatetimeIndex`` affecting architectures where ``numpy.int_`` defaults to ``numpy.int32`` (:issue:`8943`)
- Bug in Panel indexing with an object-like (:issue:`9140`)

Expand Down
4 changes: 2 additions & 2 deletions pandas/io/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import zipfile
from contextlib import contextmanager, closing

from pandas.compat import StringIO, string_types
from pandas.compat import StringIO, string_types, BytesIO
from pandas import compat


Expand Down Expand Up @@ -154,7 +154,7 @@ def get_filepath_or_buffer(filepath_or_buffer, encoding=None):
b = conn.get_bucket(parsed_url.netloc)
k = boto.s3.key.Key(b)
k.key = parsed_url.path
filepath_or_buffer = StringIO(k.get_contents_as_string())
filepath_or_buffer = BytesIO(k.get_contents_as_string())
return filepath_or_buffer, None


Expand Down