Pandas > Transpose dataframe

Name
Code
Output
dataframe = pandas.DataFrame(numpy.random.randint(0,10,size=(5, 3)), columns=['C1','C2','C3'])
print ("dataframe")
print (dataframe)
print ("transposed dataframe")
print (dataframe.T)
dataframe
   C1  C2  C3
0   5   0   9
1   0   2   7
2   9   6   8
3   2   1   1
4   6   5   5
transposed dataframe
    0  1  2  3  4
C1  5  0  9  2  6
C2  0  2  6  1  5
C3  9  7  8  1  5