Skip to content

REF: Simplify JoinUnit.is_na for categorical #20833

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
TomAugspurger opened this issue Apr 26, 2018 · 1 comment · Fixed by #37196
Closed

REF: Simplify JoinUnit.is_na for categorical #20833

TomAugspurger opened this issue Apr 26, 2018 · 1 comment · Fixed by #37196
Labels
Categorical Categorical Data Type Closing Candidate May be closeable, needs more eyeballs Internals Related to non-user accessible pandas implementation Refactor Internal refactoring of code
Milestone

Comments

@TomAugspurger
Copy link
Contributor

In JoinUnit.is_na we get the categories

if self.block.is_categorical:
values_flat = values.categories

and then check if they're all not na. Categories can't have NA in them, so we can just return False (I think).

@TomAugspurger TomAugspurger added Refactor Internal refactoring of code Internals Related to non-user accessible pandas implementation Categorical Categorical Data Type Difficulty Intermediate labels Apr 26, 2018
@TomAugspurger TomAugspurger added this to the Next Major Release milestone Apr 26, 2018
@jbrockmendel
Copy link
Member

the categories cant have NAs, but the codes can have -1s

@jbrockmendel jbrockmendel added the Closing Candidate May be closeable, needs more eyeballs label Sep 22, 2020
@jreback jreback modified the milestones: Contributions Welcome, 1.2 Oct 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Categorical Categorical Data Type Closing Candidate May be closeable, needs more eyeballs Internals Related to non-user accessible pandas implementation Refactor Internal refactoring of code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants