I have a panda's dataframe.
It looks like this:
level_0 level_1 from to
0 0 0 0.927273 0.300000
1 1 1 0.946667 0.727273
2 1 2 0.565657 0.200000
3 1 3 0.946667 0.083333
4 2 4 0.831818 1.000000
5 3 5 0.831818 0.818182
6 4 6 0.872727 0.666667
7 5 7 1.000000 0.700000
8 6 8 1.000000 1.000000
9 7 9 1.000000 0.666667
I want to output the (level_0, level_1) pairs that have the highest combined from + to scores. These are obvious for most of them, but in the case of level_0 = 1, I have three possibilities. I want the algorithm to output (1,1) because they have the highest combined from + to scores.
How do I achieve this?
Thanks in advance and my excuses for the reckless initial question.