-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: Parse missing values using read_json with dtype=False to NaN instead of None (GH28501) #37834
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
…tead of None (GH28501)
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.
yep this is way more consistent, thanks @avinashpancham
cc @WillAyd merge when ready
Nice PR! Looks like there is a merge conflict in the whatsnew - if you can fix that up we can get this merged |
Merged master, but CI fails due to unrelated reasons. Will retry with new updates from master later today |
@avinashpancham can you merge master once again |
doc/source/whatsnew/v1.2.0.rst
Outdated
@@ -624,6 +624,7 @@ I/O | |||
- Bug in :func:`read_html` was raising a ``TypeError`` when supplying a ``pathlib.Path`` argument to the ``io`` parameter (:issue:`37705`) | |||
- :meth:`to_excel` and :meth:`to_markdown` support writing to fsspec URLs such as S3 and Google Cloud Storage (:issue:`33987`) | |||
- Bug in :meth:`read_fw` was not skipping blank lines (even with ``skip_blank_lines=True``) (:issue:`37758`) | |||
- Parse missing values using :func:`read_json` with ``dtype=False`` to NaN instead of None (:issue:`28501`) |
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.
use double backticks around NaN
and None
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.
Done
@jreback merged master and updated whatsnew entry |
hmm precommit checks are failing, can you merge master and ping on green |
Still some issues, will try again tomorrow |
14c9f3f
to
9fc5989
Compare
thanks @avinashpancham |
I'm not sure that there was consensus in the issue discussion on the correct behaviour or whether it is a bug. Maybe worth considering moving the release note into the breaking changes section in case anyone is depending on this behaviour. |
type dtype option is actually pretty odd anyhow (and should deprecate) |
I think most voices in the issue actually argued that the current behaviour was correct, and so IMO we should not have changed it to start with. |
there was exactly 1 comment |
Will opened the issue, and 2 people commented on it arguing not to change it (and a third one commented as well, but off-topic), no one else argued in favor of the change. Anyway, I don't think counting the numbers is that important, but I agree with @simonjayhawkins that there was certainly no clear consensus |
On the None vs NaN, I am personally quite ambivalent, but when disabling parsing I think we should not return float dtype for this case. |
you can revert if u want this was removing a special case though - it was very odd |
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff