Skip to content

GH28301 check for non-unique index in stack_multi_columns #28336

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 3 commits into from
Sep 10, 2019
Merged

GH28301 check for non-unique index in stack_multi_columns #28336

merged 3 commits into from
Sep 10, 2019

Conversation

christopherzimmerman
Copy link
Contributor

@christopherzimmerman christopherzimmerman commented Sep 7, 2019

The old implementation used arange to generate codes for a non-multiindex, which ended up creating bad codes if the index was not unique. The fix is just a straightforward factorize.

Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

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

Also pls add a whatsnew note (1.0 reshape bug)

@jreback jreback added this to the 1.0 milestone Sep 10, 2019
@jreback jreback merged commit 07c7510 into pandas-dev:master Sep 10, 2019
@jreback
Copy link
Contributor

jreback commented Sep 10, 2019

thanks @christopherzimmerman nice patch!

@christopherzimmerman christopherzimmerman deleted the GH28301 branch September 10, 2019 14:16
proost pushed a commit to proost/pandas that referenced this pull request Dec 19, 2019
proost pushed a commit to proost/pandas that referenced this pull request Dec 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

groupby level after stack not actually grouping
3 participants