Skip to content

REF: move ArrowStringArray.__setitem__ and related methods to ArrowExtensionArray #46439

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 4 commits into from
Mar 20, 2022

Conversation

lukemanley
Copy link
Member

@lukemanley lukemanley commented Mar 20, 2022

Moved/refactored ArrowStringArray.__setitem__ and related methods to ArrowExtensionArray. These methods should be generic enough to support any pyarrow type. I left _maybe_convert_setitem_value to be implemented by the subclasses as I figured there may need to be type specific logic there.


def _indices_to_chunk_indices(
self, indices: npt.NDArray[np.intp]
) -> list[npt.NDArray[np.intp]]:
Copy link
Member

Choose a reason for hiding this comment

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

Can this be a generator?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, makes sense. updated - thanks

@jreback jreback added Refactor Internal refactoring of code ExtensionArray Extending pandas with custom dtypes or arrays. labels Mar 20, 2022
@jreback jreback added this to the 1.5 milestone Mar 20, 2022
@jreback jreback merged commit 2d6a2c3 into pandas-dev:main Mar 20, 2022
@jreback
Copy link
Contributor

jreback commented Mar 20, 2022

thanks @lukemanley

@lukemanley lukemanley deleted the arrow-ea-setitem branch March 20, 2022 23:18
yehoshuadimarsky pushed a commit to yehoshuadimarsky/pandas that referenced this pull request Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ExtensionArray Extending pandas with custom dtypes or arrays. Refactor Internal refactoring of code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants