Skip to content

Commit

Permalink
fix linting issues
Browse files Browse the repository at this point in the history
- trailing whitespace
- whitespace empty line
- too many '#' in comment
  • Loading branch information
Joost Kranendonk committed Jan 23, 2017
1 parent c2cc13a commit 90779ce
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions pandas/core/strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,8 @@ def str_replace(arr, pat, repl, n=-1, case=True, flags=0):
pat : string
Character sequence or regular expression
repl : string or callable
Replacement string or a callable. The callable is passed the regex
match object and must return a replacement string to be used.
Replacement string or a callable. The callable is passed the regex
match object and must return a replacement string to be used.
See :func:`re.sub`.
.. versionadded:: 0.20.0
Expand All @@ -329,7 +329,7 @@ def str_replace(arr, pat, repl, n=-1, case=True, flags=0):
Examples
--------
When ``repl`` is a string, every ``pat`` is replaced as with
When ``repl`` is a string, every ``pat`` is replaced as with
:meth:`str.replace`. NaN value(s) in the Series are left as is.
>>> Series(['foo', 'fuz', np.nan]).str.replace('f', 'b')
Expand All @@ -338,8 +338,8 @@ def str_replace(arr, pat, repl, n=-1, case=True, flags=0):
2 NaN
dtype: object
When ``repl`` is a callable, it is called on every ``pat`` using
:func:`re.sub`. The callable should expect one positional argument
When ``repl`` is a callable, it is called on every ``pat`` using
:func:`re.sub`. The callable should expect one positional argument
(a regex object) and return a string.
To get the idea:
Expand Down
4 changes: 2 additions & 2 deletions pandas/tests/test_strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,9 +435,9 @@ def test_replace(self):
for data in (['a', 'b', None], ['a', 'b', 'c', 'ad']):
values = klass(data)
self.assertRaises(TypeError, values.str.replace, 'a', repl)

def test_replace_callable(self):
## GH 15055
# GH 15055
values = Series(['fooBAD__barBAD', NA])

# test with callable
Expand Down

0 comments on commit 90779ce

Please sign in to comment.