diff --git a/pandas/core/strings/accessor.py b/pandas/core/strings/accessor.py index 6049002e3673d..9ffb0444f1516 100644 --- a/pandas/core/strings/accessor.py +++ b/pandas/core/strings/accessor.py @@ -1391,7 +1391,7 @@ def replace( Examples -------- - When `pat` is a string and `regex` is True (the default), the given `pat` + When `pat` is a string and `regex` is True, the given `pat` is compiled as a regex. When `repl` is a string, it replaces matching regex patterns as with :meth:`re.sub`. NaN value(s) in the Series are left as is: