From bc3a75e914efdd9b0c8cf37d531598f7a2000b0d Mon Sep 17 00:00:00 2001 From: jbrockmendel Date: Wed, 27 Nov 2019 12:48:31 -0800 Subject: [PATCH] REF: use named funcs instead of lambdas (#29841) --- pandas/core/generic.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 2e2ae4e1dfa0a2..046a9082e942e4 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -10226,7 +10226,7 @@ def compound(self, axis=None, skipna=None, level=None): name2, axis_descr, "minimum", - lambda y, axis: np.minimum.accumulate(y, axis), + np.minimum.accumulate, "min", np.inf, np.nan, @@ -10239,7 +10239,7 @@ def compound(self, axis=None, skipna=None, level=None): name2, axis_descr, "sum", - lambda y, axis: y.cumsum(axis), + np.cumsum, "sum", 0.0, np.nan, @@ -10252,7 +10252,7 @@ def compound(self, axis=None, skipna=None, level=None): name2, axis_descr, "product", - lambda y, axis: y.cumprod(axis), + np.cumprod, "prod", 1.0, np.nan, @@ -10265,7 +10265,7 @@ def compound(self, axis=None, skipna=None, level=None): name2, axis_descr, "maximum", - lambda y, axis: np.maximum.accumulate(y, axis), + np.maximum.accumulate, "max", -np.inf, np.nan,