运行 ❯
拥有你自己的 Python 服务器
×
更改方向
更改主题,深色/浅色
前往 Spaces
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