pandas.core.window.Rolling.apply
-
Rolling.apply(func, raw=None, args=(), kwargs={})[source] -
rolling function apply
Parameters: func : function
Must produce a single value from an ndarray input if
raw=Trueor a Series ifraw=Falseraw : bool, default None
-
False: passes each row or column as a Series to the function. -
TrueorNone: the passed function will receive ndarray objects instead. If you are just applying a NumPy reduction function this will achieve much better performance.
The
rawparameter is required and will show a FutureWarning if not passed. In the futurerawwill default to False.New in version 0.23.0.
- *args and **kwargs are passed to the function
Returns: - same type as input
-
© 2008–2012, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
Licensed under the 3-clause BSD License.
https://pandas.pydata.org/pandas-docs/version/0.23.4/generated/pandas.core.window.Rolling.apply.html