Skip to content

Commit a900ef9

Browse files
committed
Revert "Fixes GH43540"
This reverts commit c2e91f8.
1 parent c2e91f8 commit a900ef9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pandas/io/common.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -877,8 +877,7 @@ def read(self, size: int = -1) -> str | bytes:
877877
if self.decode:
878878
# memory mapping is applied before compression. Encoding should
879879
# be applied to the de-compressed data.
880-
final: bool = len(content) == 0
881-
return self.decoder.decode(content, final=final)
880+
return content.decode(self.encoding, errors=self.errors)
882881
return content
883882

884883
def __next__(self) -> str:

0 commit comments

Comments
 (0)