Skip to content

Commit 85c4455

Browse files
committed
pep8, removed args, kwargs
1 parent 3a6cf14 commit 85c4455

File tree

3 files changed

+4
-25
lines changed

3 files changed

+4
-25
lines changed

asv_bench/benchmarks/groupby.py

-20
Original file line numberDiff line numberDiff line change
@@ -344,26 +344,6 @@ def time_groupby_dt_timegrouper_size(self):
344344
self.df.groupby(TimeGrouper(key='dates', freq='M')).size()
345345

346346

347-
#----------------------------------------------------------------------
348-
# groupby.cummin and groupby.cummax # GH 15048
349-
350-
class groupby_cummax_cummin(object):
351-
goal_time = 0.2
352-
353-
def setup(self):
354-
np.random.seed(1234)
355-
self.G = 1000
356-
self.N = 10000
357-
self.df = pd.DataFrame({'A': np.random.randint(0, self.G, size=self.N),
358-
'B': np.random.randn(self.N)})
359-
360-
def time_cummin(self):
361-
self.df.groupby('A').cummin()
362-
363-
def time_cummax(self):
364-
self.df.groupby('A').cummax()
365-
366-
367347
#----------------------------------------------------------------------
368348
# groupby with a variable value for ngroups
369349

pandas/core/groupby.py

+3-5
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
'last', 'first',
7676
'head', 'tail', 'median',
7777
'mean', 'sum', 'min', 'max',
78-
'cumsum', 'cumprod', 'cumcount',
78+
'cumcount',
7979
'resample',
8080
'describe',
8181
'rank', 'quantile',
@@ -1418,19 +1418,17 @@ def cumsum(self, axis=0, *args, **kwargs):
14181418

14191419
@Substitution(name='groupby')
14201420
@Appender(_doc_template)
1421-
def cummin(self, axis=0, *args, **kwargs):
1421+
def cummin(self, axis=0):
14221422
"""Cumulative min for each group"""
1423-
nv.validate_groupby_func('cummin', args, kwargs)
14241423
if axis != 0:
14251424
return self.apply(lambda x: np.minimum.accumulate(x, axis))
14261425

14271426
return self._cython_transform('cummin')
14281427

14291428
@Substitution(name='groupby')
14301429
@Appender(_doc_template)
1431-
def cummax(self, axis=0, *args, **kwargs):
1430+
def cummax(self, axis=0):
14321431
"""Cumulative max for each group"""
1433-
nv.validate_groupby_func('cummax', args, kwargs)
14341432
if axis != 0:
14351433
return self.apply(lambda x: np.maximum.accumulate(x, axis))
14361434

pandas/src/algos_groupby_helper.pxi.in

+1
Original file line numberDiff line numberDiff line change
@@ -700,6 +700,7 @@ def group_cummin(numeric[:, :] out,
700700
accum[lab, j] = min_val
701701
out[i, j] = accum[lab, j]
702702

703+
703704
@cython.boundscheck(False)
704705
@cython.wraparound(False)
705706
def group_cummax(numeric[:, :] out,

0 commit comments

Comments
 (0)