Skip to content

Commit 30b49b9

Browse files
committed
PERF: GH15498 - pep8 changes
1 parent ad38544 commit 30b49b9

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

asv_bench/benchmarks/categoricals.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,18 @@ def setup(self):
7676

7777
dt = pd.util.testing.makeDateIndex(n)
7878
self.s2 = pd.Series(dt).astype('category', categories=dt)
79-
self.s2o = pd.Series(dt).astype('category', categories=dt, ordered=True)
79+
self.s2o = pd.Series(dt).astype('category', categories=dt,
80+
ordered=True)
8081

8182
fl = pd.util.testing.makeFloatIndex(n)
8283
self.s3 = pd.Series(fl).astype('category', categories=fl)
83-
self.s3o = pd.Series(fl).astype('category', categories=fl, ordered=True)
84+
self.s3o = pd.Series(fl).astype('category', categories=fl,
85+
ordered=True)
8486

8587
intg = pd.util.testing.makeIntIndex(n)
8688
self.s4 = pd.Series(intg).astype('category', categories=intg)
87-
self.s4o = pd.Series(intg).astype('category', categories=intg, ordered=True)
89+
self.s4o = pd.Series(intg).astype('category', categories=intg,
90+
ordered=True)
8891

8992
def time_rank_string_unordered(self):
9093
self.s1.rank()

pandas/tests/series/test_analytics.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -1067,7 +1067,8 @@ def test_rank_categorical(self):
10671067
['first', 'second', 'third', 'fourth', 'fifth', 'sixth']
10681068
).astype(
10691069
'category',
1070-
categories=['first', 'second', 'third', 'fourth', 'fifth', 'sixth'],
1070+
categories=['first', 'second', 'third',
1071+
'fourth', 'fifth', 'sixth'],
10711072
ordered=True
10721073
)
10731074
assert_series_equal(ordered.rank(), exp)
@@ -1078,7 +1079,8 @@ def test_rank_categorical(self):
10781079
['first', 'second', 'third', 'fourth', 'fifth', 'sixth'],
10791080
).astype(
10801081
'category',
1081-
categories=['first', 'second', 'third', 'fourth', 'fifth', 'sixth'],
1082+
categories=['first', 'second', 'third',
1083+
'fourth', 'fifth', 'sixth'],
10821084
ordered=False
10831085
)
10841086
exp_unordered = pd.Series([2., 4., 6., 3., 1., 5.])

0 commit comments

Comments
 (0)