From 2bf6bb2ede50f6ffd23cd6a8544c6d5af433ad17 Mon Sep 17 00:00:00 2001 From: Ashwin Prakash Nalwade <53330017+ashwinpn@users.noreply.github.com> Date: Thu, 5 Mar 2020 20:48:36 -0500 Subject: [PATCH 1/2] Update strings.py --- pandas/core/strings.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pandas/core/strings.py b/pandas/core/strings.py index 3be9c5fcdfb26..71d33e807d477 100644 --- a/pandas/core/strings.py +++ b/pandas/core/strings.py @@ -570,9 +570,8 @@ def str_endswith(arr, pat, na=np.nan): def str_replace(arr, pat, repl, n=-1, case=None, flags=0, regex=True): r""" - Replace occurrences of pattern/regex in the Series/Index with - some other string. Equivalent to :meth:`str.replace` or - :func:`re.sub`. + Replace occurrences of pattern/regex in the Series/Index with some other string. Equivalent to :meth:`str.replace` or + :func:`re.sub`, depending on the regex value. Parameters ---------- From 2e5852d02a8b61f30b15a99743235f0b25b34307 Mon Sep 17 00:00:00 2001 From: Ashwin Prakash Nalwade <53330017+ashwinpn@users.noreply.github.com> Date: Thu, 5 Mar 2020 21:06:56 -0500 Subject: [PATCH 2/2] Update strings.py --- pandas/core/strings.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandas/core/strings.py b/pandas/core/strings.py index 71d33e807d477..c4bdbaff1649c 100644 --- a/pandas/core/strings.py +++ b/pandas/core/strings.py @@ -570,7 +570,8 @@ def str_endswith(arr, pat, na=np.nan): def str_replace(arr, pat, repl, n=-1, case=None, flags=0, regex=True): r""" - Replace occurrences of pattern/regex in the Series/Index with some other string. Equivalent to :meth:`str.replace` or + Replace occurrences of pattern/regex in the Series/Index with + some other string. Equivalent to :meth:`str.replace` or :func:`re.sub`, depending on the regex value. Parameters