Skip to content

Commit e5cd7b1

Browse files
authored
Switch to using is not None (pandas-dev#32721)
1 parent 6620dc6 commit e5cd7b1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/core/strings.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ def str_contains(arr, pat, case=True, flags=0, na=np.nan, regex=True):
446446
stacklevel=3,
447447
)
448448

449-
f = lambda x: bool(regex.search(x))
449+
f = lambda x: regex.search(x) is not None
450450
else:
451451
if case:
452452
f = lambda x: pat in x
@@ -818,7 +818,7 @@ def str_match(arr, pat, case=True, flags=0, na=np.nan):
818818
regex = re.compile(pat, flags=flags)
819819

820820
dtype = bool
821-
f = lambda x: bool(regex.match(x))
821+
f = lambda x: regex.match(x) is not None
822822

823823
return _na_map(f, arr, na, dtype=dtype)
824824

0 commit comments

Comments
 (0)