I have a data frame similar to mentioned below:
And I need to get this type of table as the result:
a.pivot_table(index=['DT'],columns=['TYPE'], values='AMOUNT',aggfunc=['count','sum','mean']).T
where a
is the actual data
I desire to get firstly comes TYPE after count, sum, mean.