Skip to content

BUG: MultiIndex.union losing extension array dtype #48498

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 12, 2022

Conversation

phofl
Copy link
Member

@phofl phofl commented Sep 10, 2022

  • closes #xxxx (Replace xxxx with the Github issue number)
  • Tests added and passed if fixing a bug or adding a new feature
  • All code checks passed.
  • Added type annotations to new arguments/methods/functions.
  • Added an entry in the latest doc/source/whatsnew/vX.X.X.rst file if fixing a bug or adding a new feature.

This covers some cases only, will work on the remaining ones as a follow up

@phofl phofl added MultiIndex NA - MaskedArrays Related to pd.NA and nullable extension arrays labels Sep 10, 2022
Copy link
Member

@mroeschke mroeschke left a comment

Choose a reason for hiding this comment

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

The other cases that don't work are the non-numeric ones?

@phofl
Copy link
Member Author

phofl commented Sep 12, 2022

Ah no, sorry. This was not explicit enough. It does not work if we run into the algos.union_with_duplicates(lvals, rvals) code branch in _union(). This is something for a follow up

@mroeschke mroeschke added this to the 1.6 milestone Sep 12, 2022
@mroeschke mroeschke merged commit 850da57 into pandas-dev:main Sep 12, 2022
@mroeschke
Copy link
Member

Thanks @phofl

@phofl phofl deleted the ea_union branch September 12, 2022 18:00
@mroeschke mroeschke modified the milestones: 1.6, 2.0 Oct 13, 2022
noatamir pushed a commit to noatamir/pandas that referenced this pull request Nov 9, 2022
* BUG: MultiIndex.union losing extension array dtype

* Add gh ref

* Fix tests

* Fix typing

* Add note
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MultiIndex NA - MaskedArrays Related to pd.NA and nullable extension arrays
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants