Run ❯
Get your
own Python
server
×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
import pandas as pd data = { "age": [50, 40, 30, 40, 20, 10, 30], "qualified": [True, False, False, False, False, True, True] } df = pd.DataFrame(data) newdf = df.transpose() print(newdf)
0 1 2 3 4 5 6 age 50 40 30 40 20 10 30 qualified True False False False False True True