Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

rolling std dev of a pandas series

>>> 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
Source by pandas.pydata.org #
 
PREVIOUS NEXT
Tagged: #rolling #std #dev #pandas #series
ADD COMMENT
Topic
Name
7+5 =