On this page
pandas.core.window.Expanding.apply
Expanding.apply(func, raw=None, args=(), kwargs={})
[source]-
The expanding function’s apply function.
Parameters: -
func : function
-
Must produce a single value from an ndarray input if
raw=True
or a Series ifraw=False
. -
raw : bool, default None
-
False
: passes each row or column as a Series to the function.True
orNone
: the passed function will receive ndarray objects instead. If you are just applying a NumPy reduction function this will achieve much better performance.
The
raw
parameter is required and will show a FutureWarning if not passed. In the futureraw
will default to False.New in version 0.23.0.
- *args, **kwargs
-
Arguments and keyword arguments to be passed into func.
Returns: - Series or DataFrame
-
Return type is determined by the caller.
See also
Series.expanding
- Series expanding.
DataFrame.expanding
- DataFrame expanding.
-
© 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.24.2/reference/api/pandas.core.window.Expanding.apply.html