I have a dataframe, I want to transpose the rows and columns and change the name of columns as follow. My dataframe is:
import pandas as pd
df = pd.DataFrame()
df ['time'] = [1,2,3,4]
df ['a'] = [3,-1,0, 23]
df['b'] = [-1, 2, 5, 6]
df
I want to change it to the following:
Could you please help me with that?
