# 根据某个字段进行分组求个数
df.groupby('Outcome').count()
# 找到某个字段的值为0的所有列
df.loc[df['Outcome']==0]
# 删除Outcome==0的前250条数据
df = df.drop(df.loc[df['Outcome']==0].index[:240])
07-29
9353
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
06-29
6497
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)