I am working with a pandas dataframe where I would like to group the first five days and last five days together. Then from that grouping, I'd like to average the sample measurement from the same hour. ie: Of those 10 days, sample measurements from 00:00:00 averaged. Any guidance on how to achieve this would be much appreciated. Thank you.
| Datetime | Sample Measurement |
|---|---|
| 2019-08-17 00:00:00 | 10 |
| 2019-08-17 01:00:00 | 14 |
| 2019-08-17 02:00:00 | 12 |
| 2019-08-17 03:00:00 | 10 |
| ..... | .... |
| 2019-09-07 20:00:00 | 9 |
| 2019-09-07 21:00:00 | 7 |
| 2019-09-07 22:00:00 | 5 |
| 2019-09-07 23:00:00 | 3 |