Skip to content

ENH: Add masked support for rolling operations #50449

Open
@bollard

Description

@bollard

Feature Type

  • Adding new functionality to pandas

  • Changing existing functionality in pandas

  • Removing existing functionality in pandas

Problem Description

As per #50399, pandas does not currently support extension arrays in rolling operations

Feature Description

import pandas as pd

ser = pd.Series([i / 10 for i in range(1, 20)]).astype(pd.Float64Dtype())
ser.rolling(2).mean().dtype # dtype('float64') currently, pd.Float64Dtype() ideally

Alternative Solutions

Continue to rely on numpy types

Additional Context

#50399

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementExtensionArrayExtending pandas with custom dtypes or arrays.NA - MaskedArraysRelated to pd.NA and nullable extension arraysWindowrolling, ewma, expanding

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions