loc是用具体的index名称或者column名称 df.loc['a']:index名为'a'的这一行的所有数据df.loc[:,'a']:column名为'a'的这一行的所有数据 iloc是用index df.iloc[1]:选取第1行的数据df.iloc[:,1]:选取第一列的数据