I am new to python. I have a dataframe in below format

I want to pivot it to below format

How can i do this?
I am new to python. I have a dataframe in below format

I want to pivot it to below format

How can i do this?
Try using df.melt:
print(df.melt(id_vars='Name'))
If pandas version is under 0.20.0, try pd.melt:
print(pd.melt(df, id_vars='Name'))