Run ❯
Get your
own Python
server
❯
Run Code
Ctrl+Alt+R
Change Orientation
Ctrl+Alt+O
Change Theme
Ctrl+Alt+D
Go to Spaces
Ctrl+Alt+P
import pandas as pd data = { "age": [50, 40, 30], "qualified": [True, False, False] } df = pd.DataFrame(data) newdf = df.set_axis(["John", "Peter", "Alex"]) print(newdf)
age qualified John 50 True Peter 40 False Alex 30 False