Skip to content

BUG: Fix MultiIndex column stacking with dupe names #36371

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 5 commits into from
Sep 15, 2020
Merged

BUG: Fix MultiIndex column stacking with dupe names #36371

merged 5 commits into from
Sep 15, 2020

Conversation

dsaxton
Copy link
Member

@dsaxton dsaxton commented Sep 14, 2020

@dsaxton dsaxton added Bug Reshaping Concat, Merge/Join, Stack/Unstack, Explode MultiIndex labels Sep 14, 2020
@dsaxton dsaxton added this to the 1.1.3 milestone Sep 14, 2020
when columns do not have names, in which case we must leave as a level
number
to swaplevel. If `level_num` matches a column name return the name from
position `level_num`, otherwise return `level_num`.
Copy link
Member

Choose a reason for hiding this comment

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

In general the first line of a docstring should be a one -liner. see https://numpydoc.readthedocs.io/en/latest/format.html#sections

(for internal functions, imo we could follow less strict guidelines, see #32773)

@jreback jreback merged commit b53fa14 into pandas-dev:master Sep 15, 2020
@jreback
Copy link
Contributor

jreback commented Sep 15, 2020

thanks @dsaxton yeah this must have been some leftover code from when the warning was removed.

@dsaxton dsaxton deleted the multiindex-columns-same-name branch September 15, 2020 22:39
@simonjayhawkins
Copy link
Member

@meeseeksdev backport 1.1.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug MultiIndex Reshaping Concat, Merge/Join, Stack/Unstack, Explode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: DataFrame.stack does not work when MultiIndex had duplicated names
3 participants