Skip to content

API: change .resample to be a groupby-like API #11732

Closed
@jreback

Description

@jreback

similar to #11603

this would transform:

s.resample('D',how='max')

to

s.resample('D').max()

This would be a breaking API change, as the default is how='mean', meaning, that s.resample('D') returns the mean of the resampled data. However it would be visible at the very least and not simply change working code.

This would bring .resample (which is just a groupby type operation under the hood anyhow) into the API syntax for .groupby and .rolling et. al.

Furthermore this would allow geitem / aggregate type operations with minimal effort
e.g.

s.resample('D').agg(['min','max'])

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions