@@ -310,8 +310,8 @@ def str_replace(arr, pat, repl, n=-1, case=True, flags=0):
310
310
pat : string
311
311
Character sequence or regular expression
312
312
repl : string or callable
313
- Replacement string or a callable. The callable is passed the regex
314
- match object and must return a replacement string to be used.
313
+ Replacement string or a callable. The callable is passed the regex
314
+ match object and must return a replacement string to be used.
315
315
See :func:`re.sub`.
316
316
317
317
.. versionadded:: 0.20.0
@@ -329,7 +329,7 @@ def str_replace(arr, pat, repl, n=-1, case=True, flags=0):
329
329
330
330
Examples
331
331
--------
332
- When ``repl`` is a string, every ``pat`` is replaced as with
332
+ When ``repl`` is a string, every ``pat`` is replaced as with
333
333
:meth:`str.replace`. NaN value(s) in the Series are left as is.
334
334
335
335
>>> Series(['foo', 'fuz', np.nan]).str.replace('f', 'b')
@@ -338,8 +338,8 @@ def str_replace(arr, pat, repl, n=-1, case=True, flags=0):
338
338
2 NaN
339
339
dtype: object
340
340
341
- When ``repl`` is a callable, it is called on every ``pat`` using
342
- :func:`re.sub`. The callable should expect one positional argument
341
+ When ``repl`` is a callable, it is called on every ``pat`` using
342
+ :func:`re.sub`. The callable should expect one positional argument
343
343
(a regex object) and return a string.
344
344
345
345
To get the idea:
0 commit comments