-4
我JSON行,看起來像下面集結JSON對象,將字符串轉換時間戳至今
[{"time":"2017-03-23T12:23:05","user":"randomUser","action":"sleeping"}]
[{"time":"2017-03-23T12:24:05","user":"randomUser","action":"sleeping"}]
[{"time":"2017-03-23T12:33:05","user":"randomUser","action":"sleeping"}]
[{"time":"2017-03-23T15:33:05","user":"randomUser2","action":"eating"}]
[{"time":"2017-03-23T15:33:06","user":"randomUser2","action":"eating"}]
,所以我就2的問題,首先所有的時間被存儲爲字符串我DF裏面,我相信它必須是我整理它們的日期?
其次,我需要以5分鐘的時間間隔聚合這些數據,例如,2017-03-23T12:20:00至2017-03-23T12:24:59發生的所有事情都需要彙總並認爲是2017-03-23T12:20:00時間戳
預期輸出是
感謝