按照IIN列等于0,且count_same列等于1筛选dataframe数据: tn = df2[(df2['IIN'] == 0) & (df2['count_same'] == 1)] print(tn)