Skip to content
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

Handle pandas NA values in 'filter_array_like' #505

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

DamianBarabonkovQC
Copy link

@DamianBarabonkovQC DamianBarabonkovQC commented Jan 18, 2022

Description:

A recent pandas bug fix pandas-dev/pandas#45249 changed the way pandas handles NA values. The buggy way, which is not aligned with how pandas NA values work, was to treat it as 'None of the Above'. In other words, in filter_array_like, pd.NA == True and pd.NA == False would both return False. The correct pandas semantics is for pd.NA == True and pd.NA == False to equal pd.NA. That however diverges from numpy where numpy assumes the 'None of the Above' semantic.

This patch forces pandas to use the 'None of the Above' semantic, to keep it inline with numpy semantics.

Copy link
Contributor

@xhochy xhochy left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM!

@xhochy
Copy link
Contributor

xhochy commented Jan 27, 2022

@steffen-schroeder-by Any chance to get CI started here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants