Skip to content

Commit 8f7d8aa

Browse files
committed
Merge branch 'master' of https://github.com/pandas-dev/pandas into annotate
2 parents c1a8ad6 + e5cd7b1 commit 8f7d8aa

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)