I have a data frame with multiple time indexed entries per day. I want to sample and x number of days (eg 2 days) and the iterate forward 1 day to the end of the range of days. How can I achieve this.
For example if each day has greater than one entry:
datetime value
2015-12-02 12:02:35 1
2015-12-02 12:02:44 2
2015-12-03 12:39:05 4
2015-12-03 12:39:12 7
2015-12-04 14:27:41 2
2015-12-04 14:27:45 8
2015-12-07 09:52:58 3
2015-12-07 13:52:15 5
2015-12-07 13:52:21 9
I would like to iterate through taking two day samples at a time eg
2015-12-02 12:02:35 1
2015-12-02 12:02:44 2
2015-12-03 12:39:05 4
2015-12-03 12:39:12 7
then
2015-12-03 12:39:05 4
2015-12-03 12:39:12 7
2015-12-04 14:27:41 2
2015-12-04 14:27:45 8
ending with
2015-12-04 14:27:41 2
2015-12-04 14:27:45 8
2015-12-07 09:52:58 3
2015-12-07 13:52:15 5
2015-12-07 13:52:21 9
Any help would be appreciated!