Skip to content
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

Closed
wants to merge 9 commits into from

Conversation

Winand
Copy link
Contributor

@Winand Winand commented Feb 15, 2016

closes #12133
level names are lost on MultiIndex.from_arrays(cartesian_product(table.index.levels))



assert_equal(pv_col.index.names, names1)
assert_equal(pv_ind.columns.names, names1)
Copy link
Contributor

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

Copy link
Contributor Author

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?

@jreback
Copy link
Contributor

jreback commented Feb 15, 2016

pls add a whatsnew entry (0.18.0 bug fixes)
you also have linting errors

@jreback jreback added Bug Reshaping Concat, Merge/Join, Stack/Unstack, Explode labels Feb 15, 2016
@@ -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`)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.pivot_table()

@@ -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`)
Copy link
Contributor

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

@jreback
Copy link
Contributor

jreback commented Mar 12, 2016

pls rebase/update

@jreback
Copy link
Contributor

jreback commented Apr 14, 2016

closed in favor of #12650

@jreback jreback closed this Apr 14, 2016
@Winand
Copy link
Contributor Author

Winand commented Apr 14, 2016

I'll do my best to learn how to squash commits ASAP.)

@Winand Winand deleted the pivot_table_dropna branch May 1, 2016 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Reshaping Concat, Merge/Join, Stack/Unstack, Explode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

crosstab dropna=False breaks columns.names
2 participants