Skip to content

Commit b00fbe0

Browse files
committed
BUG: Fix Series.str.contains with compiled regex on Arrow string dtype (#61942) and add whatsnew note
1 parent 9a7e640 commit b00fbe0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/core/arrays/string_arrow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ def _str_contains(
346346
):
347347
if flags:
348348
return super()._str_contains(pat, case, flags, na, regex)
349-
if isinstance(pat, re.pattern):
349+
if isinstance(pat, re.Pattern):
350350
pat = pat.pattern
351351

352352
return ArrowStringArrayMixin._str_contains(self, pat, case, flags, na, regex)

0 commit comments

Comments
 (0)