Skip to content

ENH/TST: Add isin, _hasna for ArrowExtensionArray #47805

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 2 commits into from
Jul 22, 2022

Conversation

mroeschke
Copy link
Member

@mroeschke mroeschke commented Jul 20, 2022

@mroeschke mroeschke added Testing pandas testing functions or related to the test suite Arrow pyarrow functionality labels Jul 20, 2022
@mroeschke mroeschke added this to the 1.5 milestone Jul 20, 2022
@@ -425,6 +430,49 @@ def dropna(self: ArrowExtensionArrayT) -> ArrowExtensionArrayT:
else:
return type(self)(pc.drop_null(self._data))

def isin(self, values):
Copy link
Contributor

Choose a reason for hiding this comment

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

can you type this?

# to False
return np.array(result, dtype=np.bool_)

def _values_for_factorize(self) -> tuple[np.ndarray, Any]:
Copy link
Contributor

Choose a reason for hiding this comment

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

any test for this?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yup, test_arrow.py::BaseMethodsTests::test_hash_pandas_object_works hits this line

@jreback jreback merged commit 8f04a8e into pandas-dev:main Jul 22, 2022
@mroeschke mroeschke deleted the arrow/misc_methods2 branch July 22, 2022 01:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arrow pyarrow functionality Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants