Answers for "rolling std dev of a pandas series"

0

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
Posted by: Guest on January-08-2021

Python Answers by Framework

Browse Popular Code Answers by Language