Hello. My datetimeindex has a delta of 15 seconds and no gaps between start_dt and end_dt. For each timestamp, I am trying to find the max value in a 7 day past window for that exact timestamp. i.e. for dt 2024-04-02 00:00:00, I want to look at the same timestamp 00:00:00 but on 2024-04-01, 2024-03-31, ...
But it seems the step parameter in the df method .rolling() is rather unintuitive wherein it is fully skipping over rows by the step size, rather than making sliding window steps by that step size for each row. For step=2, the rows halve in number for example. Here's what I'm working with currently, please let me know what I can do.
df["val"].rolling(window=7*4*60*24, step=4*60*24, min_periods=1)
where 4 * 60 * 24 skips 1 day (15 second delta * 4 (== 1 minute) * 60 * 24)
I've already tried the other intuitive variation, window=7
Thanks in advance.