-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
BUG: Fix Series.str.contains with compiled regex on Arrow string dtype (#61942) #61946
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
base: main
Are you sure you want to change the base?
Conversation
0b16375
to
838b1c5
Compare
Hi @mroeschke I'd appreciate it if you could take a look and share your feedback. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fix should go into _str_contains
of ArrowExtensionArray
Thankyou for the feedback! |
Additionally, if this is something that is not implemented by pyarrow, we should not raise a NotImplementedError, but fall back on the python object implementation (you can see a similar pattern in some other str methods, like |
@jorisvandenbossche Thank you for the feedback! I will update the PR accordingly. Would you mind letting me know the reason behind the one failing check (pre-commit.ci)? |
ruff is failing, which is used for auto formatting. I would recommend to install the pre-commit locally to avoid having this fail on CI: https://pandas.pydata.org/docs/dev/development/contributing_codebase.html#pre-commit |
#61942
This PR fixes an issue in
Series.str.contains()
where passing a compiled regex object failed when the underlying string data is backed by PyArrow.Please, provide feedback if my approach is not correct , I would love to improve and contribute in this.