pandas 像SQL一样使用WHERE IN查询条件
in
newDropList = [9,10,11,12,22,50,51,60,61]
newDB = newDB[newDB['groupId'].isin(newDropList)]
直接查询表中groupId列,值为newDropList的记录
not in
newDropList = [9,10,11,12,22,50,51,60,61]
newDB = newDB[-newDB['groupId'].isin(newDropList)]
直接加一个" - " 号即可