@@ -2446,32 +2446,6 @@ def _convert_int_result(self, result):
2446
2446
def _convert_rank_result (self , result ):
2447
2447
return type (self )(result )
2448
2448
2449
- def _str_contains (self , pat , case = True , flags = 0 , na = lib .no_default , regex = True ):
2450
- if isinstance (pat , re .Pattern ):
2451
- if flags != 0 :
2452
- return BaseStringArrayMethods ._str_contains (
2453
- self , pat , case , flags , na , regex
2454
- )
2455
- pat = pat .pattern
2456
- regex = True
2457
- elif flags != 0 :
2458
- return BaseStringArrayMethods ._str_contains (
2459
- self , pat , case , flags , na , regex
2460
- )
2461
-
2462
- try :
2463
- if not regex :
2464
- result = pc .match_substring (self ._pa_array , pat , ignore_case = not case )
2465
- else :
2466
- result = pc .match_substring_regex (
2467
- self ._pa_array , pat , ignore_case = not case
2468
- )
2469
- return self ._convert_bool_result (result , na = na , method_name = "contains" )
2470
- except (AttributeError , NotImplementedError , pa .ArrowNotImplementedError ):
2471
- return BaseStringArrayMethods ._str_contains (
2472
- self , pat , case , flags , na , regex
2473
- )
2474
-
2475
2449
def _str_count (self , pat : str , flags : int = 0 ) -> Self :
2476
2450
if flags :
2477
2451
raise NotImplementedError (f"count not implemented with { flags = } " )
0 commit comments