-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
[ArrowStringArray] PERF: use pa.compute.match_substring_regex for str.fullmatch if available #41332
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
Conversation
pandas/core/arrays/string_arrow.py
Outdated
|
||
def _str_match( | ||
self, pat: str, case: bool = True, flags: int = 0, na: Scalar = None | ||
): | ||
if pa_version_under4p0: | ||
return super()._str_match(pat, case, flags, na) |
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 may be quicker if using the fallback.... will need to check.
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.
broken this change off into #41487, slighter quicker than master, to bring the perf for object fallback back to before the pyarrow native implementation was added
return super()._str_fullmatch(pat, case, flags, na) | ||
|
||
if not pat.endswith("$") or pat.endswith("//$"): | ||
pat = pat + "$" |
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.
we probably don't need the check but maybe faster... will need to check.
object fallback
|
thanks ! |
….fullmatch if available (pandas-dev#41332)
….fullmatch if available (pandas-dev#41332)
No description provided.