Deleting DataFrame row in Pandas based on column value

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

I have the following DataFrame:

             daysago  line_race rating        rw    wrating
 line_date                                                 
 2007         


        
10条回答
  •  不知归路
    2020-11-22 04:28

    Another way of doing it. May not be the most efficient way as the code looks a bit more complex than the code mentioned in other answers, but still alternate way of doing the same thing.

      df = df.drop(df[df['line_race']==0].index)
    

提交回复
热议问题