-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Pivot NaN Bug #3588
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
Comments
This looks like a general ‘multi-index with Nan’ problem, and as the pivot() method is re-indexing, it blows up. At a minimum, it would be nice to have an exception thrown when sum(df.index.isnull()>0 to warn, then people can clean up the Nans in the columns before indexing (either directly or indirectly through things like pivot).
the index as used then drops the Nan, and then the values are scrambled as the 'a' column lost the Nan index value
even though the index has the values:
single column index with Nan seems to work OK
|
set_index seems fine in lastest master, what version are you on?
|
a bit non-trivial, but fixed by #3588, @seignour @john-granieri want to test out? |
Thanks for fixing. I had been on 0.10.1. Indeed, on 0.11 the indexing problem went away, but the pivot was still broken. Thanks for fixing! We'll test it out in the latest build. |
glad to hear...v0.11.1 should be out shortly...let us know of any issues |
The 'pivot' function does not properly handle NaNs. E.g.:
(No NaNs, works properly)
But:
(Incorrect results, does not crash)
Bug is present in versions 0.8.1 and 0.10.1
The text was updated successfully, but these errors were encountered: