Skip to content

Commit 71b42f8

Browse files
committed
Minor PEP8 fixes
1 parent 2298503 commit 71b42f8

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

pandas/core/strings.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
def _get_array_list(arr, others, align=True):
3939
from pandas.core.series import Series
40-
40+
4141
if (len(arr) and isinstance(arr, Series)
4242
and len(others) and isinstance(others, Series)):
4343
if align is None:
@@ -49,7 +49,7 @@ def _get_array_list(arr, others, align=True):
4949
"behavior) and silence this warning, pass "
5050
"'align=True'")
5151
if align:
52-
arr, others = arr.align(others, join = 'left')
52+
arr, others = arr.align(others, join='left')
5353
arrays = [list(arr), list(others)]
5454
elif len(others) and isinstance(com._values_from_object(others)[0],
5555
(list, np.ndarray, Series)):

pandas/tests/test_strings.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -2760,18 +2760,17 @@ def test_str_cat_raises_intuitive_error(self):
27602760
s.str.cat('|')
27612761
with tm.assert_raises_regex(ValueError, message):
27622762
s.str.cat(' ')
2763-
2763+
27642764
def test_str_cat_align(self):
27652765
# https://github.com/pandas-dev/pandas/issues/18657
27662766
s = Series(['a', 'b', 'c', 'd'])
2767-
t = Series(['a', 'b', 'c', 'd']).reindex([1,3,0,2])
2767+
t = Series(['a', 'b', 'c', 'd']).reindex([1, 3, 0, 2])
27682768
expect_aligned = Series(['aa', 'bb', 'cc', 'dd'])
27692769
expect_unaligned = Series(['ab', 'bd', 'ca', 'dc'])
27702770
with tm.assert_produces_warning(expected_warning=UserWarning):
27712771
tm.assert_series_equal(s.str.cat(t), expect_unaligned)
27722772
tm.assert_series_equal(s.str.cat(t, align=False), expect_unaligned)
27732773
tm.assert_series_equal(s.str.cat(t, align=True), expect_aligned)
2774-
27752774

27762775
def test_index_str_accessor_visibility(self):
27772776
from pandas.core.strings import StringMethods

0 commit comments

Comments
 (0)