Is it possible to use the tabulate function with a dictionary that is three levels deep? I took this dictionary from source and modified it a bit just to use as an idea.
MENU = {
"espresso":
{
"ingredients 1":
{
"water": 50,
"coffee": 18,
},
"ingredients 2":
{
"water": 55,
"coffee": 20,
}
}
},
"latte":
{
"ingredients 1":
{
"water": 200,
"coffee": 24,
},
"ingredients 2":
{
"water": 225,
"coffee": 30,
}
}
},
"cappuccino":
{
"ingredients 1":
{
"water": 150,
"coffee": 45,
},
"ingredients 2":
{
"water": 155,
"coffee": 40,
}
}
}
}
What I'm looking for table-wise is something like this:
Drink Info Water Coffee
-------- ------ ----- ------
Espresso Ingredients 1 50 18
Espresso Ingredients 2 55 20
Latte Ingredients 1 50 18
Latte Ingredients 2 55 20
Cappuccino Ingredients 1 50 18
Cappuccino Ingredients 2 55 20
or this:
Drink Info Water Coffee
-------- ------ ----- ------
Espresso Ingredients 1 50 18
Ingredients 2 55 20
Latte Ingredients 1 50 18
Ingredients 2 55 20
Cappuccino Ingredients 1 50 18
Ingredients 2 55 20