How to pivot a pandas Dataframe in Python?


I am trying to pivot the below dataframe. I want the column names to be added as rows. First row is a statis one but the Column names are not static since they will be calculated for the all numerical columns from the data frame. Could you please help.

This is my data frame:

enter image description here

Expected Dataframe:

enter image description here


Answer

Other way is .transpose():

data_pivot = data_pd.transpose()