运行 ❯
获取您自己的
Python
服务器
×
更改方向
更改主题,深色/浅色
转到 Spaces
import pandas as pd data = { "calories": [420, 380, 390], "duration": [50, 40, 45] } df = pd.DataFrame(data, index = ["day1", "day2", "day3"]) print(df.loc["day2"])
calories 380 duration 40 Name: day2, dtype: int64