I have a dictionary with lists:
d1 = {
'Carlos': {
'manzanas': ['12', 'verdes', '7', 'rojas', '5'],
'uvas': ['8', 'negras', '5', 'verdes', '3']
},
'Juan': {
'manzanas': ['7', 'verdes', '5', 'rojas', '2'],
'uvas': ['9', 'negras', '9'], 'pomelo': ['12', 'amarillo', '5', 'rosado', '7']
},
'Pedro': {
'manzanas': ['14', 'verdes',' 6', ' rojas', ' 8'], 'pomelo': ['19', 'amarillo', '10', 'rosado', '9']
}
}
I would like to do a function where I enter a fruit and show me ONLY who has more quantity of it (the quantity is the first number of the list of each fruit), also the types of that fruit and their respective quantity.
** Detail: d1 is loaded from a .csv file on my PC. The function should serve me for any other .csv file (of the same format) that opens in Python. The program to open the file and place it on d1 has already been done.