📜  df.loc jupyter - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:30.063000             🧑  作者: Mango

代码示例1
>>> df = pd.DataFrame([[1, 2], [4, 5], [7, 8]],
...      index=['cobra', 'viper', 'sidewinder'],
...      columns=['max_speed', 'shield'])
>>> df
            max_speed  shield
cobra               1       2
viper               4       5
sidewinder          7       8