我有一个数据框,如下所示。这是两个检查员在不同日期所经过的距离。
Inspector_ID Timestamp Distance
1 2018-07-24 7:31:00 0
1 2018-07-24 7:31:01 2.3
1 2018-07-24 7:33:01 2.8
1 2018-07-25 7:32:04 0
1 2018-07-25 7:33:06 3.6
2 2018-07-20 8:35:08 0
2 2018-07-20 8:36:10 5.6
2 2018-07-20 8:37:09 2.1
2 2018-07-27 8:38:00 0
2 2018-07-27 8:39:00 3
2 2018-07-27 8:40:00 2.6
从上面,我想在数据框下面准备
预期产量
Inspector_ID Day_of_the_month Total_distance No.of_entries_in that_day week_of_the_month
1 24 5.1 3 4
1 25 3.6 2 4
2 20 7.7 3 3
2 27 5.6 3 4