Series.str.replace()
pandas.Series.str.replace
-
Series.str.replace(pat, repl, n=-1, case=True, flags=0)
-
Replace occurrences of pattern/regex in the Series/Index with some other string. Equivalent to
str.replace()
orre.sub()
.Parameters: pat : string
Character sequence or regular expression
repl : string
Replacement sequence
n : int, default -1 (all)
Number of replacements to make from start
case : boolean, default True
If True, case sensitive
flags : int, default 0 (no flags)
re module flags, e.g. re.IGNORECASE
Returns: replaced : Series/Index of objects
© 2011–2012 Lambda Foundry, Inc. and PyData Development Team
© 2008–2011 AQR Capital Management, LLC
© 2008–2014 the pandas development team
Licensed under the 3-clause BSD License.
http://pandas.pydata.org/pandas-docs/version/0.18.1/generated/pandas.Series.str.replace.html