Pandas version checks
-
[X] I have checked that this issue has not already been reported.
-
[X] I have confirmed this bug exists on the latest version of pandas.
-
[ ] I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
import pandas as pd
s = pd.Series([1.2e+03, 1.3e+17, 1.5e+17, 1.995e+03, 1.990e+03])
s.rolling(2).std()
Issue Description
The output is
0 NaN
1 9.192388e+16
2 1.414214e+16
3 1.060660e+17
4 0.000000e+00
dtype: float64
In fact, for any values afterwards with a similar magnitude (e.g., 1.234e+03), the rolling std is always 0.
Expected Behavior
0 NaN
1 9.192388e+16
2 1.414214e+16
3 1.060660e+17
4 3.535534e+00
dtype: float64
Installed Versions
Comment From: jesse-sealand
Same issue:
python : 3.11.4 python-bits : 64 OS : Windows
Comment From: matsidzi
Possibly duplicate of #53289 (which is the duplicate of #52407).
Comment From: kaixiongg
Possibly duplicate of #53289 (which is the duplicate of #52407).
52407 has been already taken for one year without any update, maybe assign others to this task?
Comment From: rhshadrach
maybe assign others to this task?
We do not assign issues to contributors; contributors take what issues they are interested in working on.
Comment From: suzyahyah
take