From a98bd343dac4aa187f9bbd5227cfd675e8d39e9e Mon Sep 17 00:00:00 2001 From: David Krych Date: Tue, 13 Feb 2018 15:34:12 -0500 Subject: [PATCH] Clarify it is "regex=False" that does not work with compiled regex. --- pandas/core/strings.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/core/strings.py b/pandas/core/strings.py index a8eb0c07b0f0f..9969117a7e02f 100644 --- a/pandas/core/strings.py +++ b/pandas/core/strings.py @@ -351,8 +351,8 @@ def str_replace(arr, pat, repl, n=-1, case=None, flags=0, regex=True): Notes ----- When `pat` is a compiled regex, all flags should be included in the - compiled regex. Use of `case`, `flags`, or `regex` with a compiled regex - will raise an error. + compiled regex. Use of `case`, `flags`, or `regex=False` with a compiled + regex will raise an error. Examples --------