-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Inconsistent behavior of hierarchical indexes when indexes are of different data types #3521
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
You should try to use GitHub flavored markdown when you post code/output or images (slightly faster than copypasting/retyping/editing-after-retyping), it's much easier to read. |
@kghose What version are you using? I get a |
Thanks for checking. I'm using '0.11.0'. Had the same issue with '0.10.0' |
Okay. That's probably the issue. I'm using git master (which is version 0.12.0.dev-9b6b8fb), so if you can you might want to upgrade. At least you might be able to clone the latest repo and do a git diff on |
@cpcloud . Thank you! That helps me out. I might stick with the released versions for a bit. How is your experience with master? How stable is it? I worry about bugs on the bleeding edge. |
Closing as issue seems to be resolved with latest version ( @cpcloud ) |
@kghose I'm not sure how to measure the stability of a code base. I find it pretty "stable", but I'm probably the worst person to ask about this, since I work in neuroscience and stability is usually not a concern because I can fix it most of the time. I also use the bleeding edge of every part of the Python science stack and it has yet to fail me in a way that totally curbs my productivity. You should take what I say about this with a tiny grain of salt, though, for the aforementioned reasons. |
Oh, I'm in the same business. But I worry about subtle bugs that get through and skew results, but I simply should write more thorough tests that I run periodically (My usual practice is to test a method and then freeze it and forget about it. But newer versions of libraries may introduce subtle bugs e.g. in NaN handling that are nasty for data processing). |
I know what you mean. For analyzing data I am crazy about assertions I put them everywhere so that I can fail as soon as possible. That helps cut down on writing tests for, say, a one off plotting script specific to a particular paper or kind of analysis you're doing. I've found that pandas and the scientific python community is very aware of this exact issue and these 'subtle' bugs are few and far between. However, see #3513 for an example of what you're talking about. |
@kghose You also might be interested in this blog post. |
@cpcloud thanks for the links. |
This is unexpected behavior, especially since axis=1 does not care
This now works, because the sub-index is same type (str)
The text was updated successfully, but these errors were encountered: