From d939805e5c9835904220060a6c7bc8d01adb140f Mon Sep 17 00:00:00 2001 From: jbrockmendel Date: Mon, 25 Nov 2019 13:20:30 -0800 Subject: [PATCH] REF: use named funcs instead of lambdas --- 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 2e2ae4e1dfa0a..046a9082e942e 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,