I have a dataframe:
Name   Fruit    Fruit-Low   Fruit-High
Joe    Apple     8.12       8.74
Joe    Pear      3.54       6.24
Jess   Orange    5.36       8.24
Jess   Apple     5.45       8.44
I am trying to convert the dataframe into a specific dictionary format such as:
dictionary = {Joe: {Apple: (8.12, 8.74), Pear: (3.54, 6.24)}, Jess: {Orange: (5.36, 8.24), Apple: (5.45, 8.44)}}
Is there a pay to specify this format when converting the dataframe? I have tried the to_dict() command but continue to not be able to bring in all the rows as I am trying.
Any help would be greatly appreciated! Thanks in advance.