Expanding.std(self, ddof=1, *args, **kwargs)
[source]
Calculate expanding standard deviation.
Normalized by N-1 by default. This can be changed using the ddof
argument.
Parameters: |
|
---|---|
Returns: |
|
See also
Series.expanding
DataFrame.expanding
Series.std
DataFrame.std
numpy.std
The default ddof
of 1 used in Series.std is different than the default ddof
of 0 in numpy.std.
A minimum of one period is required for the rolling calculation.
>>> s = pd.Series([5, 5, 6, 7, 5, 5, 5]) >>> s.rolling(3).std() 0 NaN 1 NaN 2 0.577350 3 1.000000 4 1.000000 5 1.154701 6 0.000000 dtype: float64
>>> s.expanding(3).std() 0 NaN 1 NaN 2 0.577350 3 0.957427 4 0.894427 5 0.836660 6 0.786796 dtype: float64
© 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.25.0/reference/api/pandas.core.window.Expanding.std.html