pandas之loc索引函数的应用

#找到英格兰、意大利、俄罗斯的射正率
e=data.Team.isin(['England', 'Italy', 'Russia'])#返回布尔值

data.loc[e]#索引出这三个国家所有的属性值

data.loc[e,['Team','Shooting Accuracy']]#索引出这三个国家的射正率

猜你喜欢

转载自blog.csdn.net/weixin_39920026/article/details/108563197