Pandas Pivot Tables is empty, want to fill with values from other column

Viewed 9

I have a table which e.g. looks like this

Food Compound Content in grams
Kiwi Fat 5
Kiwi Protein 3
Apple Protein 2

I want to pivot it with pandas, so that it looks like

Food Fat Protein
Kiwi 5 3
Apple 2 0

Thanks in Advance!

0 Answers
Related