Skip to content

Commit 1c7d565

Browse files
committed
fix pep8
1 parent 8bd4442 commit 1c7d565

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

pandas/_libs/reduction.pyx

+4-3
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,10 @@ cdef class Reducer:
139139
if i == 0:
140140
# On the first pass, we check the output shape to see
141141
# if this looks like a reduction.
142-
# if it does not, return the computed value to be used by the pure python implementation,
143-
# so the function won't be called twice on the same object (and side effects would occur twice)
142+
# If it does not, return the computed value to be used by the
143+
# pure python implementation,
144+
# so the function won't be called twice on the same object,
145+
# and side effects would occur twice
144146
try:
145147
_check_result_array(extracted_res, len(self.dummy))
146148
except ValueError as err:
@@ -151,7 +153,6 @@ cdef class Reducer:
151153
partial_result = copy(res)
152154
break
153155

154-
155156
PyArray_SETITEM(result, PyArray_ITER_DATA(it), extracted_res)
156157
chunk.data = chunk.data + self.increment
157158
PyArray_ITER_NEXT(it)

pandas/core/apply.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818

1919
from pandas.core.construction import create_series_with_explicit_dtype
2020

21+
from pandas.core.frame import DataFrame
2122
from pandas.core.series import Series
22-
from pandas import DataFrame
2323

2424
if TYPE_CHECKING:
2525
from pandas import DataFrame, Series, Index
@@ -326,7 +326,8 @@ def apply_series_generator(self, partial_result=None) -> Tuple[ResType, "Index"]
326326
keys = []
327327
results = {}
328328

329-
# If a partial result was already computed, use it instead of running on the first element again
329+
# If a partial result was already computed,
330+
# use it instead of running on the first element again
330331
series_gen_enumeration = enumerate(series_gen)
331332
if partial_result is not None:
332333
i, v = next(series_gen_enumeration)

0 commit comments

Comments
 (0)