🌈 搜索
📅  最后修改于: 2022-03-11 14:47:05.806000             🧑  作者: Mango
df1 = df[df['a']==1].sample(n=50) df0 = df[df['a']==0].sample(n=50) print(pd.concat([df1,df0]))