I apologize that I cannot provide a reproducible example, as this issue was discovered while working with an extremely large DataFrame.
I've observed that when performing rolling(window).std() on a DataFrame with tens of millions of rows, the calculations produce incorrect results. For example:
-
With window=40, the calculated std at index = x is approximately 0.5 in the full DataFrame;
-
However, if I take a subset of the DataFrame (rows x-45 to x) and perform the same rolling(40).std() operation, the result at index x becomes approximately 0.2.
This inconsistency suggests there may be numerical precision issues or algorithmic differences when handling very large DataFrames.