in
newDropList = [9,10,11,12,22,50,51,60,61]
newDB = newDB[newDB[‘groupId’].isin(newDropList)]
直接查询表中...9,10,11,12,22,50,51,60,61]
newDB = newDB[-newDB[‘groupId’].isin(newDropList)]
直接加一个” – ” 号即可
补充知识:pandas条件组合筛选和按范围筛选...3、其次,从记录中选出所有满足set条件且fault_code列的值在fault_list= [487, 479, 500, 505]这个范围内的记录
record_this_month=record...(1)多个条件筛选的时候每个条件都必须加括号。
(2)判断值是否在某一个范围内进行筛选的时候需要使用DataFrame.isin()的isin()函数,而不能使用in。...以上这篇pandas 像SQL一样使用WHERE IN查询条件说明就是小编分享给大家的全部内容了,希望能给大家一个参考。