Skip to content

Commit 47c0826

Browse files
committed
Move fix into _str_contains of ArrowExtensionArray
1 parent f618751 commit 47c0826

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

pandas/core/arrays/arrow/array.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2468,8 +2468,6 @@ def _convert_rank_result(self, result):
24682468
return type(self)(result)
24692469

24702470
def _str_contains(self, pat, case=True, flags=0, na=lib.no_default, regex=True):
2471-
import re
2472-
24732471
if isinstance(pat, re.Pattern):
24742472
if flags != 0:
24752473
# fallback to python object implementation
@@ -2497,11 +2495,6 @@ def _str_count(self, pat: str, flags: int = 0) -> Self:
24972495
raise NotImplementedError(f"count not implemented with {flags=}")
24982496
return type(self)(pc.count_substring_regex(self._pa_array, pat))
24992497

2500-
def _str_count(self, pat: str, flags: int = 0) -> Self:
2501-
if flags:
2502-
raise NotImplementedError(f"count not implemented with {flags=}")
2503-
return type(self)(pc.count_substring_regex(self._pa_array, pat))
2504-
25052498
def _str_repeat(self, repeats: int | Sequence[int]) -> Self:
25062499
if not isinstance(repeats, int):
25072500
raise NotImplementedError(

0 commit comments

Comments
 (0)