I have some data with timestamps and location data like follows:
A 2013-02-05 19:45:00 (39.94, -86.159)
A 2013-02-05 19:55:00 (39.94, -86.159)
A 2013-02-05 20:00:00 (39.777, -85.995)
A 2013-02-05 20:05:00 (39.775, -85.978)
B 2013-02-05 22:20:00 (39.935, -86.159)
B 2013-02-05 22:25:00 (39.935, -86.159)
B 2013-02-05 23:55:00 (39.951, -86.151)
B 2013-02-06 00:00:00 (39.951, -86.151)
B 2013-02-06 00:05:00 (39.906, -86.196)
C 2013-02-06 00:25:00 (39.82, -86.249)
C 2013-02-06 00:30:00 (39.82, -86.249)
C 2013-02-06 02:45:00 (41.498, -81.527)
C 2013-02-06 02:55:00 (41.498, -81.527)
C 2013-02-06 04:35:00 (39.82, -86.249)
C 2013-02-06 04:40:00 (39.82, -86.249)
What I need to do is that for each user for each day get a histogram of the number of times someone was in one location continuously. Hence, I want to mark each continuous period where the location remains the same for each user, each day.
How would I go about that in python pandas?
Cases that the location repeats for a user in one day is possible as shown for user C, the location (39.82. -86.249) occurs again. So, those cases are to be considered separate continuous times.