I am trying to use pandas.melt() or pandas.pivot() to convert rows from Column Food-Type into Column headings and Dates into row.
Food-Type 2021 Oct-21 Nov-21
Banana 104 104.4 105.5
cereals 105.7 105.8 106.5
Rice 97.6 97.5 98.2
The end result should be like this.
Banana cereals Rice
2021 104 105.7 105.5
Oct-21 104.4 105.8 106.5
Nov-21 105.5 97.5 98.2