Skip to content

Commit 2b358a6

Browse files
jbrockmendeljreback
authored andcommitted
REF: use named funcs instead of lambdas (#29841)
1 parent 70f1c28 commit 2b358a6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pandas/core/generic.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -10226,7 +10226,7 @@ def compound(self, axis=None, skipna=None, level=None):
1022610226
name2,
1022710227
axis_descr,
1022810228
"minimum",
10229-
lambda y, axis: np.minimum.accumulate(y, axis),
10229+
np.minimum.accumulate,
1023010230
"min",
1023110231
np.inf,
1023210232
np.nan,
@@ -10239,7 +10239,7 @@ def compound(self, axis=None, skipna=None, level=None):
1023910239
name2,
1024010240
axis_descr,
1024110241
"sum",
10242-
lambda y, axis: y.cumsum(axis),
10242+
np.cumsum,
1024310243
"sum",
1024410244
0.0,
1024510245
np.nan,
@@ -10252,7 +10252,7 @@ def compound(self, axis=None, skipna=None, level=None):
1025210252
name2,
1025310253
axis_descr,
1025410254
"product",
10255-
lambda y, axis: y.cumprod(axis),
10255+
np.cumprod,
1025610256
"prod",
1025710257
1.0,
1025810258
np.nan,
@@ -10265,7 +10265,7 @@ def compound(self, axis=None, skipna=None, level=None):
1026510265
name2,
1026610266
axis_descr,
1026710267
"maximum",
10268-
lambda y, axis: np.maximum.accumulate(y, axis),
10268+
np.maximum.accumulate,
1026910269
"max",
1027010270
-np.inf,
1027110271
np.nan,

0 commit comments

Comments
 (0)