Say I have a dictionary that looks like:
{('a','1'):2,
('a','2'):1,
('b','1'):3,
('b','2'):2}
I want to get a dataframe result that takes the highest value item for the first key ('a','b' in this case) and create a dataframe from the tuple key.
key value
'a' '1'
'b' '1'
How can I do this in python?