Skip to content

BUG: avoid unnecessary casting in CategoricalIndex.reindex #42063

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 9 commits into from
Jul 12, 2021

Conversation

jbrockmendel
Copy link
Member

Doesn't appear to be anything user-facing. The only unequivocally wrong bit is on L420 where the current condition is always truthy.

@jreback jreback added the Categorical Categorical Data Type label Jun 18, 2021
@jreback
Copy link
Contributor

jreback commented Jun 18, 2021

can you rebase. what's the bug?

@jbrockmendel
Copy link
Member Author

what's the bug?

It's not user-facing, just clearly-unintended code. On L420 if not isinstance(cats, CategoricalIndex) or (cats == -1).any(): always holds bc cats is an ndarray.

@jbrockmendel
Copy link
Member Author

rebased + greenish

@jreback jreback added this to the 1.4 milestone Jul 1, 2021
@jreback
Copy link
Contributor

jreback commented Jul 1, 2021

looks fine can you rebase

@jbrockmendel
Copy link
Member Author

rebased + green

@jreback jreback merged commit 9870859 into pandas-dev:master Jul 12, 2021
@jbrockmendel
Copy link
Member Author

booyah. bunch of MultiIndex PRs that are blockers for... more MultiIndex PRs. Nothing urgent.

@jbrockmendel jbrockmendel deleted the ref-reindex-ci branch July 12, 2021 02:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Categorical Categorical Data Type
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants