Skip to content

Conversation

@Alvaro-Kothe
Copy link
Member

@Alvaro-Kothe Alvaro-Kothe commented Oct 26, 2025


I also had to update some tests, because PyArrow replacement differs from python re module, where in re, if you use a reference with another digit (e.g., \10) it is considered invalid. In PyArrow, it's considered reference + literal.

Additionally, I could only reproduce the error reported in #62653 when converting with .convert_dtypes(dtype_backend="pyarrow"), constructing the series with an arrow dtype didn't reproduce.


Strings
^^^^^^^
- Bug in :meth:`Series.str.replace` raising an error on valid group references (``\1``, ``\2``, etc.) on series converted to PyArrow backend dtype (:issue:`62653`)
Copy link
Member

Choose a reason for hiding this comment

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

Just noting if there will be a 2.3.4 release, this PR should probably be backported

@mroeschke mroeschke added this to the 3.0 milestone Oct 27, 2025
@mroeschke mroeschke added Strings String extension data type and string data Arrow pyarrow functionality labels Oct 27, 2025
@mroeschke mroeschke merged commit a947b55 into pandas-dev:main Oct 27, 2025
43 of 44 checks passed
@mroeschke
Copy link
Member

Thanks @Alvaro-Kothe

@Alvaro-Kothe Alvaro-Kothe deleted the fix/regex-group-arrow branch October 27, 2025 20:30
Alvaro-Kothe added a commit to Alvaro-Kothe/pandas that referenced this pull request Oct 27, 2025
…-dev#62872)

Co-authored-by: zishan044 <winchesterfelix007@gmail.com>
(cherry picked from commit a947b55)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Arrow pyarrow functionality Strings String extension data type and string data

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: Series.str.replace stopped working with regex groups

3 participants