pandas transpose

df.T
df.head().T

Here is what the above code is Doing:
1. We’re using the .T attribute to transpose the dataframe.
2. We’re using the .head() method to return the first 5 rows of the dataframe.
3. We’re using the .T attribute again to transpose the dataframe back to its original shape.