-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Sampling at pre-defined time values #9168
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
While it is not using passed timestamps, I don't know if that's necessary to get what you are looking for. I think the below does what you want as your passed timestamps would be every 2.5s.
Unfortunately, 2.5s is not supported which I think it probably should be. The below is interpreted as 5 rather than 2.5 (I'm pretty sure there is already a request for this).
|
Thank you @rockg I used |
@rockg's solution is fine for the example I provided, but I used this example only to convey the problem. In my case, I can't make assumptions about the timestamps (the timestamps may not even come at regular time intervals). They are timestamps arriving asynchronously at the |
Seems like there hasn't been much interest in this feature over the years so closing |
Consider a time-series, e.g.:
and an independent set of timestamps, e.g.:
Is there any way to sample the original time-series so that, for each of the new timestamps, we get the sum of values of the original time-series between the new time-stamps?
Another way to put it, is there any way to call
resample
by passing it a series of timestamps on which we want to do the sampling? e.g. something likemy_series.resample(how='sum', new_timestamps)
The text was updated successfully, but these errors were encountered: