Skip to content

Incorrect rolling std() results on very large DataFrames #61677

Open
@ZuotaoZhang

Description

@ZuotaoZhang

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions