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

BUG: eq not implemented for categorical and arrow backed strings #55364

Merged
merged 5 commits into from
Oct 3, 2023

Conversation

phofl
Copy link
Member

@phofl phofl commented Oct 3, 2023

  • closes #xxxx (Replace xxxx with the GitHub issue number)
  • Tests added and passed if fixing a bug or adding a new feature
  • All code checks passed.
  • Added type annotations to new arguments/methods/functions.
  • Added an entry in the latest doc/source/whatsnew/vX.X.X.rst file if fixing a bug or adding a new feature.

@phofl phofl requested a review from mroeschke October 3, 2023 09:42
@phofl phofl added this to the 2.1.2 milestone Oct 3, 2023
if isinstance(other, (ArrowExtensionArray, np.ndarray, list, BaseMaskedArray)):
if isinstance(
other, (ArrowExtensionArray, np.ndarray, list, BaseMaskedArray)
) or isinstance(getattr(other, "dtype", None), CategoricalDtype):
Copy link
Member

Choose a reason for hiding this comment

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

So for Categorical, we don't need to extract the underlying values?

Copy link
Member Author

Choose a reason for hiding this comment

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

That's what _box_pa is doing, isn't it?

Copy link
Member

Choose a reason for hiding this comment

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

True, I guess in _box_pa pa.array is correctly handling it luckily which is good.

@mroeschke mroeschke added Strings String extension data type and string data Categorical Categorical Data Type labels Oct 3, 2023
Copy link
Member

@mroeschke mroeschke left a comment

Choose a reason for hiding this comment

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

Merge conflict otherwise LGTM

@phofl phofl merged commit 7df4211 into pandas-dev:main Oct 3, 2023
33 checks passed
@phofl phofl deleted the cat_eq_string branch October 3, 2023 20:01
meeseeksmachine pushed a commit to meeseeksmachine/pandas that referenced this pull request Oct 3, 2023
mroeschke pushed a commit that referenced this pull request Oct 3, 2023
…orical and arrow backed strings) (#55381)

Backport PR #55364: BUG: eq not implemented for categorical and arrow backed strings

Co-authored-by: Patrick Hoefler <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Categorical Categorical Data Type Strings String extension data type and string data
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants