-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
API: change .resample to be a groupby-like API #11732
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This change would also eliminate the need many of the current use cases for This API will work well for downsampling (to a coarser time resolution), but it's not clear to me how it would work for upsampling or combined down/upsampling. For example, how would you upsample from daily to hourly data using forward filling with the new API? |
|
I am not sure that combined up/downsampling is even possible now? |
or maybe to be more in-line
(or all the above) I guess
|
Here's a simple example of combined up/downsampling:
|
I suppose we could have an optional e.g.
which I would do like: I guess |
POC
|
original API detection & warning support for isinstance / numeric ops support for comparison ops DOC: documentation updates w.r.t. aggregation
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, thats.resample('D')
returns themean
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'])
The text was updated successfully, but these errors were encountered: