I have a data frame like this:
0 04:10 obj1
1 04:10 obj1
2 04:11 obj1
3 04:12 obj2
4 04:12 obj2
5 04:12 obj1
6 04:13 obj2
Wanted to get a cumulative count for all the objects like this:
idx time object obj1_count obj2_count
0 04:10 obj1 1 0
1 04:10 obj1 2 0
2 04:11 obj1 3 0
3 04:12 obj2 3 1
4 04:12 obj2 3 2
5 04:12 obj1 4 2
6 04:13 obj2 4 3
Tried playing with cumsum but not sure that is the right way. Any suggestions?