執行 ❯
擁有你自己的 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