@@ -712,7 +712,7 @@ def rep(x, r):
712
712
return result
713
713
714
714
715
- def str_match (arr , pat , case = True , flags = 0 , na = np .nan , as_indexer = None ):
715
+ def str_match (arr , pat , case = True , flags = 0 , na = np .nan ):
716
716
"""
717
717
Determine if each string matches a regular expression.
718
718
@@ -725,8 +725,6 @@ def str_match(arr, pat, case=True, flags=0, na=np.nan, as_indexer=None):
725
725
flags : int, default 0 (no flags)
726
726
re module flags, e.g. re.IGNORECASE
727
727
na : default NaN, fill value for missing values.
728
- as_indexer
729
- .. deprecated:: 0.21.0
730
728
731
729
Returns
732
730
-------
@@ -744,17 +742,6 @@ def str_match(arr, pat, case=True, flags=0, na=np.nan, as_indexer=None):
744
742
745
743
regex = re .compile (pat , flags = flags )
746
744
747
- if (as_indexer is False ) and (regex .groups > 0 ):
748
- raise ValueError ("as_indexer=False with a pattern with groups is no "
749
- "longer supported. Use '.str.extract(pat)' instead" )
750
- elif as_indexer is not None :
751
- # Previously, this keyword was used for changing the default but
752
- # deprecated behaviour. This keyword is now no longer needed.
753
- warnings .warn ("'as_indexer' keyword was specified but is ignored "
754
- "(match now returns a boolean indexer by default), "
755
- "and will be removed in a future version." ,
756
- FutureWarning , stacklevel = 3 )
757
-
758
745
dtype = bool
759
746
f = lambda x : bool (regex .match (x ))
760
747
@@ -2490,9 +2477,8 @@ def contains(self, pat, case=True, flags=0, na=np.nan, regex=True):
2490
2477
return self ._wrap_result (result )
2491
2478
2492
2479
@copy (str_match )
2493
- def match (self , pat , case = True , flags = 0 , na = np .nan , as_indexer = None ):
2494
- result = str_match (self ._parent , pat , case = case , flags = flags , na = na ,
2495
- as_indexer = as_indexer )
2480
+ def match (self , pat , case = True , flags = 0 , na = np .nan ):
2481
+ result = str_match (self ._parent , pat , case = case , flags = flags , na = na )
2496
2482
return self ._wrap_result (result )
2497
2483
2498
2484
@copy (str_replace )
0 commit comments