I have a dataframe that looks like below
I would like to convert this to following dataframe by adding headers and also put the value on last column as header as follows
Any help on this would be appreciated, i tried .groupby
but it requires a column name which i dont have now.