Skip to content

Commit 7a0c3fc

Browse files
committed
BUG : read_csv() twice decodes stream on URL file pandas-dev#10424
1 parent a14f513 commit 7a0c3fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/io/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def maybe_read_encoded_stream(reader, encoding=None):
9494
else:
9595
errors = 'replace'
9696
encoding = 'utf-8'
97-
reader = StringIO(reader.read().decode(encoding, errors))
97+
reader = BytesIO(reader.read())
9898
else:
9999
encoding = None
100100
return reader, encoding

0 commit comments

Comments
 (0)