Skip to content

BUG: Allow Series with same name with crosstab (#13279) #16028

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

Merged
merged 8 commits into from
Jul 30, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add related issue number and add period
  • Loading branch information
mroeschke committed Jul 30, 2017
commit 45daa14d1fdb55136016a3c44da28c399c42cd2d
3 changes: 2 additions & 1 deletion pandas/core/reshape/pivot.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,9 @@ def pivot_table(data, values=None, index=None, columns=None, aggfunc='mean',

table = agged
if table.index.nlevels > 1:
# Related GH #17123
# If index_names are integers, determine whether the integers refer
# to the level position or name
# to the level position or name.
index_names = agged.index.names[:len(index)]
Copy link
Contributor

Choose a reason for hiding this comment

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

add a comment here about level names being in integer could be ambiguous (and ref the issue number about this; I think we have one)

to_unstack = []
for i in range(len(index), len(keys)):
Expand Down