Skip to content

BUG: regression in MultiIndex.isin when index contains NA #48905

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

Closed
3 tasks done
lukemanley opened this issue Oct 1, 2022 · 0 comments · Fixed by #48877
Closed
3 tasks done

BUG: regression in MultiIndex.isin when index contains NA #48905

lukemanley opened this issue Oct 1, 2022 · 0 comments · Fixed by #48877
Labels
Bug MultiIndex Regression Functionality that used to work in a prior pandas version

Comments

@lukemanley
Copy link
Member

lukemanley commented Oct 1, 2022

Pandas version checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pandas.

  • I have confirmed this bug exists on the main branch of pandas.

Reproducible Example

import pandas as pd

mi1 = pd.MultiIndex.from_tuples([(1, pd.NA)])
mi2 = pd.MultiIndex.from_tuples([(1, 1), (1, 2)])

mi2.isin(mi1)

Issue Description

output:

array([True, True])    # <- main
array([False, False])  # <- 1.5.0

Regression is on main only and looks to be a result of #48622.

The bug is not in MultiIndex.isin per se, but #48622 looks to have exposed the underlying bug to MultiIndex.isin.

Open PR #48877 will fix the underlying bug.

Expected Behavior

array([False, False])

Installed Versions

Replace this line with the output of pd.show_versions()

@lukemanley lukemanley added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Oct 1, 2022
@lukemanley lukemanley added Regression Functionality that used to work in a prior pandas version MultiIndex and removed Needs Triage Issue that has not been reviewed by a pandas team member labels Oct 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug MultiIndex Regression Functionality that used to work in a prior pandas version
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant