-
-
Notifications
You must be signed in to change notification settings - Fork 18.3k
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
FIX: pivot_table dropna=False drops index level names #12327
Conversation
|
||
|
||
assert_equal(pv_col.index.names, names1) | ||
assert_equal(pv_ind.columns.names, names1) |
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.
construct an expected frame, and use assert_frame_equal
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.
@jreback do you mean i need to fully rewrite test_pivot_table_dropna
or just make a separate DataFrame for this case?
pls add a whatsnew entry (0.18.0 bug fixes) |
@@ -540,3 +540,4 @@ of columns didn't match the number of series provided (:issue:`12039`). | |||
|
|||
- Bug in ``.loc`` setitem indexer preventing the use of a TZ-aware DatetimeIndex (:issue:`12050`) | |||
- Big in ``.style`` indexes and multi-indexes not appearing (:issue:`11655`) | |||
- Bug in ``pivot_table`` where ``dropna`` argument drops columns and index level names (:issue:`12133`) |
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.
.pivot_table()
what's new fix, reference issue
@@ -540,3 +540,4 @@ of columns didn't match the number of series provided (:issue:`12039`). | |||
|
|||
- Bug in ``.loc`` setitem indexer preventing the use of a TZ-aware DatetimeIndex (:issue:`12050`) | |||
- Big in ``.style`` indexes and multi-indexes not appearing (:issue:`11655`) |
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.
move to 0.18.1
pls rebase/update |
closed in favor of #12650 |
I'll do my best to learn how to squash commits ASAP.) |
closes #12133
level names are lost on
MultiIndex.from_arrays(cartesian_product(table.index.levels))