Skip to content

BUG: MultiIndex union setting wrong sortorder parameter #44762

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 4 commits into from
Dec 10, 2021

Conversation

phofl
Copy link
Member

@phofl phofl commented Dec 4, 2021

@phofl phofl added Indexing Related to indexing on series/frames, not to indexes themselves MultiIndex labels Dec 4, 2021
@phofl phofl changed the title BUG: MultiIndex union setting wrong sortorder parametre BUG: MultiIndex union setting wrong sortorder parameter Dec 4, 2021
@jreback jreback added this to the 1.4 milestone Dec 4, 2021
@@ -379,6 +379,22 @@ def test_multiindex_setitem_columns_enlarging(self, indexer, exp_value):
)
tm.assert_frame_equal(df, expected)

def test_sorted_multiindex_after_union(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

are all 3 cases from the OP represented (elsewhere)?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point, added the working case too

@jreback jreback merged commit b71761d into pandas-dev:master Dec 10, 2021
@jreback
Copy link
Contributor

jreback commented Dec 10, 2021

thanks @phofl

@phofl phofl deleted the 44752 branch December 10, 2021 20:40
@taozuoqiao
Copy link

thanks very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Indexing Related to indexing on series/frames, not to indexes themselves MultiIndex
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: UnsortedIndexError is raised when slicing a dataframe with monotonic increasing multi-index.
3 participants