-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Exact matches in time-based .rolling() #13965
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
For similarity with resampling, would this make sense as a parameter |
Although |
@chris-b1 The choice is rather binary: either we want all timestamps strictly greater than the lowest bound, or we want all timestamps greater than or equal to the lowest bound. |
Yep, fair point. I might be off base, but I find That said, regardless of how it's spelled, I do think it'd be a nice addition! |
@chris-b1 Fair point about first in |
Agreed with @chris-b1 that it would be a nice addition, but for me I think it is actually about an open vs closed interval? So maybe using |
How about |
@chrisaycock re-reading this, is there a suggestion to change |
@jreback Since there are only two possible values for that parameter, I'd rather that it be a boolean. |
I would like to
allow_exact_matches
in time-based.rolling()
. Using an example similar to the one found in the documentation:I can compute the three-second rolling sum:
But note that
09:00:03
does not include09:00:00
,09:00:05
does not include09:00:02
, and09:00:06
does not include09:00:03
. If I were to include these timestamps, then I would have:A quick-and-dirty way of getting these values is with:
pd.merge_asof()
has the parameterallow_exact_matches
to permit this. Would it be possible to add this to.rolling()
?I can try this one myself.
The text was updated successfully, but these errors were encountered: