I've a pandas data frame, df
with structure similar to
Timestamp, colA, colB, colC, colD
Now, I want a multi-indexed data frame
colA, colB, colC, colD, Time window, count
where colA, colB, colC, colD
forms a multi-index index and time-window denotes a 5 minute time stamp window and count denotes the number of times the event identified by multi-index occurs in this rolling five minute window occurred. This operation is required to be performed every 30 minutes, t-35 mins to t-5, so there are 30 possible 5 min windows.