Deleting DataFrame row in Pandas based on column value

前端 未结 10 2436
悲哀的现实
悲哀的现实 2020-11-22 04:08

I have the following DataFrame:

             daysago  line_race rating        rw    wrating
 line_date                                                 
 2007         


        
10条回答
  •  刺人心
    刺人心 (楼主)
    2020-11-22 04:40

    If you want to delete rows based on multiple values of the column, you could use:

    df[(df.line_race != 0) & (df.line_race != 10)]
    

    To drop all rows with values 0 and 10 for line_race.

提交回复
热议问题