Skip to content

Commit d88f8d1

Browse files
committed
BUG: Fix Series.str.contains with compiled regex and arrow strings (#61942)
1 parent cbab096 commit d88f8d1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pandas/core/arrays/string_arrow.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,9 @@ def _str_contains(
344344
na=lib.no_default,
345345
regex: bool = True,
346346
):
347+
if isinstance(pat, re.Pattern) and regex:
348+
return super()._str_contains(pat, case, flags, na, regex)
349+
347350
if flags:
348351
return super()._str_contains(pat, case, flags, na, regex)
349352

0 commit comments

Comments
 (0)