I have a data frame in the below format:
Date        Id       A         B         C          D        E
2018-01-28 5937.0 11.000000 11.000000 10.000000 10.000000 10.000000
2018-01-21 5937.0 10.000000 10.000000 10.000000 10.000000 10.000000
I want to change the data into the below format:
             Id       2018-01-28         2018-01-21
A           5937.0   11.000000          10.000000
B           5937.0   11.000000          10.000000
C           5937.0   10.000000          10.000000
D           5937.0   10.000000          10.000000
E           5937.0   10.000000          10.000000
What is the best method to carry out following transformation. I have been using pivot but its not working(I am not very good with pivot)
 
     
     
    