查找df 中存在某些字段,可以使用isin,但是没有not in ,我们可以这样实现

# IN
count_df[count_df.reportno.isin(t_reportno)]
 
# NOT IN
count_df[~count_df.reportno.isin(t_reportno)]

其中,t_reportno是list,当然也可以是其他的

相关文章:

  • 2021-07-22
  • 2021-06-25
  • 2021-06-06
  • 2022-03-08
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-14
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2023-01-11
  • 2022-12-23
  • 2021-08-06
  • 2021-11-22
相关资源
相似解决方案