Skip to content

ENH: Downsampling pyarrow backed DatetimeIndex should potentially return date32 instead of timestamp #58308

Open
@WillAyd

Description

@WillAyd

Feature Type

  • Adding new functionality to pandas

  • Changing existing functionality in pandas

  • Removing existing functionality in pandas

Problem Description

In [30]: pd.Series(
    ...:     range(3),
    ...:     index=pd.Index([
    ...:         "2024-01-01 00:00:00",
    ...:         "2024-01-01 12:00:00",
    ...:         "2024-01-02 00:00:00"
    ...:     ], dtype=pd.ArrowDtype(pa.timestamp("s")))
    ...: ).resample("D").asfreq().index.dtype
Out[30]: timestamp[s][pyarrow]

Feature Description

When downsampling to a resolution of day or lower, I think .resample should return a pyarrow date type

Alternative Solutions

status quo

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions