Skip to content

Commit 90779ce

Browse files
author
Joost Kranendonk
committed
fix linting issues
- trailing whitespace - whitespace empty line - too many '#' in comment
1 parent c2cc13a commit 90779ce

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

pandas/core/strings.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -310,8 +310,8 @@ def str_replace(arr, pat, repl, n=-1, case=True, flags=0):
310310
pat : string
311311
Character sequence or regular expression
312312
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.
315315
See :func:`re.sub`.
316316
317317
.. versionadded:: 0.20.0
@@ -329,7 +329,7 @@ def str_replace(arr, pat, repl, n=-1, case=True, flags=0):
329329
330330
Examples
331331
--------
332-
When ``repl`` is a string, every ``pat`` is replaced as with
332+
When ``repl`` is a string, every ``pat`` is replaced as with
333333
:meth:`str.replace`. NaN value(s) in the Series are left as is.
334334
335335
>>> 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):
338338
2 NaN
339339
dtype: object
340340
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
343343
(a regex object) and return a string.
344344
345345
To get the idea:

pandas/tests/test_strings.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -435,9 +435,9 @@ def test_replace(self):
435435
for data in (['a', 'b', None], ['a', 'b', 'c', 'ad']):
436436
values = klass(data)
437437
self.assertRaises(TypeError, values.str.replace, 'a', repl)
438-
438+
439439
def test_replace_callable(self):
440-
## GH 15055
440+
# GH 15055
441441
values = Series(['fooBAD__barBAD', NA])
442442

443443
# test with callable

0 commit comments

Comments
 (0)