Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

BUG: Fix Series.str.zfill for ArrowDtype string arrays #61485 #61533

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

Open
iabhi4 wants to merge 3 commits into pandas-dev:main
base: main
Choose a base branch
Loading
from iabhi4:bugfix-arrow-str-zfill

Conversation

Copy link
Contributor

@iabhi4 iabhi4 commented Jun 1, 2025

Implemented _str_zfill for ArrowExtensionArray to support Series.str.zfill on Arrow-backed string arrays (ArrowDtype(pa.string())). This fixes an AttributeError due to the method relying on _str_map, which wasn't implemented. Used _apply_elementwise to match the approach of other string methods. Added tests under test_string_array.py and confirmed they pass. Also confirmed no other relevant test files are broken and the change aligns with how other string accessors are handled.

@iabhi4 iabhi4 force-pushed the bugfix-arrow-str-zfill branch 2 times, most recently from bab4b9a to 1d5c66f Compare June 3, 2025 22:32
@iabhi4 iabhi4 requested a review from mroeschke June 3, 2025 22:36
@iabhi4 iabhi4 force-pushed the bugfix-arrow-str-zfill branch 2 times, most recently from 057db65 to 5bd175a Compare June 5, 2025 01:00
@mroeschke mroeschke added the Strings String extension data type and string data label Jun 6, 2025
@iabhi4 iabhi4 force-pushed the bugfix-arrow-str-zfill branch from 5bd175a to 9a9c203 Compare June 6, 2025 20:41
@iabhi4 iabhi4 requested a review from mroeschke June 6, 2025 20:42
Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com>
Copy link
Contributor

This pull request is stale because it has been open for thirty days with no activity. Please update and respond to this comment if you're still interested in working on this.

Copy link
Member

@jorisvandenbossche jorisvandenbossche left a comment

Choose a reason for hiding this comment

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

This actually looks good to me! Will just need to be updated with latest main

Copy link
Contributor Author

iabhi4 commented Sep 12, 2025

Thanks for the review @jorisvandenbossche , will resolve the conflicts

@iabhi4 iabhi4 force-pushed the bugfix-arrow-str-zfill branch 3 times, most recently from 7c018b0 to 4ebf1eb Compare September 13, 2025 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@mroeschke mroeschke Awaiting requested review from mroeschke

@datapythonista datapythonista Awaiting requested review from datapythonista

@jorisvandenbossche jorisvandenbossche Awaiting requested review from jorisvandenbossche

Requested changes must be addressed to merge this pull request.

Assignees
No one assigned
Labels
Arrow pyarrow functionality Strings String extension data type and string data
Projects
None yet
Milestone
3.0
Development

Successfully merging this pull request may close these issues.

BUG: zfill with pyarrow string

AltStyle によって変換されたページ (->オリジナル) /