-
-
Notifications
You must be signed in to change notification settings - Fork 19.4k
Closed
Milestone
Description
Related to this question.
I would like to propose either to expand .resample to work on indexes that are integers or to create another method that does the same thing (maybe more general .upsample and .downsample methods).
If it was implemented as an expansion of resample I imagine something like:
df = pd.DataFrame(np.random.randn(10,2))
df.resample(5, np.std)
Which would produce:
0 1
0 1.184582 0.492113
5 0.533134 0.982562which is a pretty forward downsample case. For upsampling maybe some discussion is needed on how to return the indexes.
This should be simple to program and I think it would be a very useful shortcut.