I have data in following form:
key, time_bin, count
abc, 1, 200
abc, 2,230
abc1,1,300
abc1,2,180
abc2,1, 300
abc2,2, 800
So each of the key has same number of time_bin..
I want to find the following.. For each,time bin which are the top n keys based on count..
So, in the example above.. lets say I want to find out.. what are the top 2 keys for each time bin? So..answer is
1=> [{"abc1",300},{"abc2":300}]
2=> ({"abc2":800},{"abc":230}]
WHat is a good way to solve this?