How to Remove Rows from Pandas Data Frame that Contains any String in a Particular Column

后端 未结 4 809
轻奢々
轻奢々 2021-01-21 18:04

I have CSV data in the following format:

+-------------+-------------+-------+
|  Location   | Num of Reps | Sales |
+-------------+-------------+-------+
| 7589         


        
4条回答
  •  庸人自扰
    2021-01-21 18:22

    Or you could do

    df[df['Location'].str.isnumeric()]
    
    
      Location  Num of Reps  Sales
    0    75894            3     12
    2    75286            7     24
    4    27659            3     17
    

提交回复
热议问题