-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: read_csv used in file like object RawIOBase is not recognize encoding option #31596
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
Conversation
doc/source/whatsnew/v1.1.0.rst
Outdated
@@ -109,6 +109,7 @@ Datetimelike | |||
- :meth:`DatetimeArray.searchsorted`, :meth:`TimedeltaArray.searchsorted`, :meth:`PeriodArray.searchsorted` not recognizing non-pandas scalars and incorrectly raising ``ValueError`` instead of ``TypeError`` (:issue:`30950`) | |||
- Bug in :class:`Timestamp` where constructing :class:`Timestamp` with dateutil timezone less than 128 nanoseconds before daylight saving time switch from winter to summer would result in nonexistent time (:issue:`31043`) | |||
- Bug in :meth:`DataFrame.reindex` and :meth:`Series.reindex` when reindexing with a tz-aware index (:issue:`26683`) | |||
- Bug in :meth: `read_csv` used in file like object `RawIOBase` is not recognize `encoding` option (:issue:`31575`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this render correctly? (see building the documentation)
I think you might need
:meth:`read_csv`
(without the blank space)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, sorry. And change log position is not correct.
Is this going in 1.1 or 1.0.1? @jorisvandenbossche added the issue to 1.0.1, and if it's fixing a regression it should go there. If so, you'll need to move the release note @paihu. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. pls move the note; ping on green.
doc/source/whatsnew/v1.1.0.rst
Outdated
@@ -178,6 +178,7 @@ I/O | |||
^^^ | |||
- Bug in :meth:`read_json` where integer overflow was occuring when json contains big number strings. (:issue:`30320`) | |||
- Bug in :meth:`DataFrame.to_json` was raising ``NotFoundError`` when ``path_or_buf`` was an S3 URI (:issue:`28375`) | |||
- Bug in :meth:`read_csv` used in file like object ``RawIOBase`` is not recognize ``encoding`` option (:issue:`31575`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can move to 1.0.1 (same section)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved it.
read_csv
used in file like object RawIOBase
is not recognize encoding
option
@paihu make sure to merge master you have a conflict |
I think this issue is regression bug. so I insert |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we rather check for isinstance(.., io.IOBase)
instead of checking both BufferedIOBase and RawIOBase?
IOBase
additionally is also the base class of TextIOBase
cc @gfyoung
We don't want to wrap text( |
Because in that case (eg something like a StringIO object), it is assumed to be already encoded UTF string, so encoding shouldn't be applied then? |
Thanks @paihu! |
…RawIOBase is not recognize encoding option
…is not recognize encoding option (#31698) Co-authored-by: paihu <[email protected]>
Thanks @paihu! |
open( buffering=0)
option. #31575black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff