inplace=True:不创建新的对象,直接对原始对象进行修改;
inplace=False:对数据进行修改,创建并返回新的对象承载其修改结果。

pandas 删除指定条件的行

row_index=df[(~df['日期'].str.contains(r'休息',na=True))&(df['餐补']==0)].index
   df.drop(row_index,inplace=True)

相关文章:

  • 2023-01-29
  • 2022-12-23
  • 2021-05-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-05-06
  • 2021-06-23
  • 2022-12-23
  • 2022-02-27
  • 2021-08-06
  • 2022-12-23
  • 2021-12-13
相关资源
相似解决方案