Skip to content

Conversation

@majiayu000
Copy link
Contributor

Summary

  • Add __and__, __rand__, __or__, __ror__, __xor__, __rxor__, __invert__ methods to Expression class to support combining conditions with &, |, ^, ~ operators in pd.col expressions (GH#63322)

  • Fix comp_method_OBJECT_ARRAY to return BooleanArray when input contains pd.NA values, ensuring NA is properly propagated in comparison results instead of returning False (GH#63328)

Test Plan

  • Test pd.col with & operator for combining conditions in .loc
  • Test NA comparison consistency for object dtype Series containing pd.NA

Closes #63322
Closes #63328

- Add __and__, __rand__, __or__, __ror__, __xor__, __rxor__, __invert__
  methods to Expression class to support combining conditions with & | ^
  operators in pd.col expressions (GH#63322)

- Fix comp_method_OBJECT_ARRAY to return BooleanArray when input contains
  pd.NA values, ensuring NA is properly propagated in comparison results
  instead of returning False (GH#63328)
@majiayu000 majiayu000 closed this Dec 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: inconsistency with missing values comparison BUG: pd.col does not support & for combining conditions in .loc

1 participant