I have the following Python pandas dataframe:
fruits | numFruits --------------------- 0 | apples | 10 1 | grapes | 20 2 | figs | 15 <
fruits | numFruits --------------------- 0 | apples | 10 1 | grapes | 20 2 | figs | 15
You can use transpose api of pandas as follow:
df.transpose()
Considering df as your pandas dataframe