Skip to content

Conversation

Alvaro-Kothe
Copy link
Contributor


This PR fixes inconsistent behavior in Series.str.replace() when using named capture groups with string[pyarrow] dtype compared to other string dtypes.

@Alvaro-Kothe Alvaro-Kothe changed the title Fix/pyarrow string regex replacement BUG: fix pyarrow string regex replacement Sep 7, 2025
@simonjayhawkins simonjayhawkins added Bug Strings String extension data type and string data Arrow pyarrow functionality labels Sep 10, 2025
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.

Thanks, looks great!

I do think we can still backport this to 2.3.x, as it should be an easy backport. Can you move the whatsnew note to 2.3.x for that?

@jorisvandenbossche jorisvandenbossche added this to the 2.3.3 milestone Sep 12, 2025
@jorisvandenbossche jorisvandenbossche merged commit 4afee55 into pandas-dev:main Sep 12, 2025
41 checks passed
@jorisvandenbossche
Copy link
Member

Thanks!

meeseeksmachine pushed a commit to meeseeksmachine/pandas that referenced this pull request Sep 12, 2025
jorisvandenbossche pushed a commit that referenced this pull request Sep 13, 2025
…lacement) (#62328)

Co-authored-by: Álvaro Kothe <kothe65@gmail.com>
@Alvaro-Kothe Alvaro-Kothe deleted the fix/pyarrow-string-regex-replacement branch September 13, 2025 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arrow pyarrow functionality Bug Strings String extension data type and string data
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: .str.replace repl string incorrectly parsed with pyarrow string dtype
3 participants