对应标签/取值范围,来选择数据 两种方式打印出来的效果一样 切片 更高级的选择方式 select bylabel:loc exm:print(df.loc[‘20220103’]) 对行列进行选择 df.loc[:,‘a’:‘c’] ** select by position:.iloc,i指的index ** (另一种筛选,把label和position结合在一起,ix已经弃用了,loc即可,记住太多也没用 mixed selection:ix) Boolean indexing 这里只对比a,但是其它也会显示出来