code: def _replace(expr, pat, repl, n=-1, case=True, flags=0, regex=True):
      
  
      return _string_op(expr, Replace, _pat=pat, _repl=repl,
                        _n=n, _case=case, _flags=flags, _regex=regex)
docs: Replace occurrence of pattern/regex in the sequence or scalar with some other string.
      Equivalent to str.replace()
  
      :param expr:
      :param pat: Character sequence or regular expression
      :param repl: Replacement
      :param n: Number of replacements to make from start
      :param case: if True, case sensitive
      :param flags: re module flag, e.g. re.IGNORECASE
      :return: sequence or scalar