From 1620c59379c531d9e3737e8f6ccb5257c7dd7039 Mon Sep 17 00:00:00 2001 From: mitch Date: Thu, 21 Jun 2018 23:47:57 -0700 Subject: [PATCH] clarifying regex pipe behavior --- pandas/core/strings.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pandas/core/strings.py b/pandas/core/strings.py index 9632df46d3bbf..08239ae4dae20 100644 --- a/pandas/core/strings.py +++ b/pandas/core/strings.py @@ -335,11 +335,11 @@ def str_contains(arr, pat, case=True, flags=0, na=np.nan, regex=True): 4 False dtype: bool - Returning 'house' and 'parrot' within same string. + Returning 'house' or 'dog' when either expression occurs in a string. - >>> s1.str.contains('house|parrot', regex=True) + >>> s1.str.contains('house|dog', regex=True) 0 False - 1 False + 1 True 2 True 3 False 4 NaN