Skip to content

ENH: support addition with pyarrow string dtypes #51338

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 8 commits into from
Feb 17, 2023

Conversation

jbrockmendel
Copy link
Member

@mroeschke it wouldn't surprise me if you say you prefer to explicitly not support addition this way, but this seems like a pretty big use case, and the _libs.ops functions are a pretty great fit.

@jbrockmendel jbrockmendel added the Arrow pyarrow functionality label Feb 13, 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.

Just a merge conflict, otherwise LGTM

@mroeschke
Copy link
Member

=================================== FAILURES ===================================
________________________________ test_str_join _________________________________
[gw1] linux -- Python 3.8.16 /home/runner/micromamba/envs/test/bin/python3.8

    @pytest.mark.xfail(
        reason="TODO: StringMethods._validate should support Arrow list types",
        raises=AttributeError,
    )
    def test_str_join():
        ser = pd.Series(ArrowExtensionArray(pa.array([list("abc"), list("123"), None])))
>       result = ser.str.join("=")

raises should change to a NotImplementedError it appears (which is better IMO)

@mroeschke
Copy link
Member

Nevermind it looks like this was fixed in #51441

@mroeschke
Copy link
Member

pandas/core/arrays/arrow/array.py:472: error: List item 0 has incompatible type "bytes"; expected "str"  [list-item]

@jbrockmendel
Copy link
Member Author

greenish

@mroeschke mroeschke added this to the 2.0 milestone Feb 17, 2023
@mroeschke mroeschke merged commit 41d937d into pandas-dev:main Feb 17, 2023
@mroeschke
Copy link
Member

Thanks @jbrockmendel

@jbrockmendel jbrockmendel deleted the enh-string-add branch February 17, 2023 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arrow pyarrow functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants