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

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

I have CSV data in the following format:

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


        
4条回答
  •  Happy的楠姐
    2021-01-21 18:21

    In [139]: df[~df.Location.str.contains('\D')]
    Out[139]:
      Location  Num of Reps  Sales
    0    75894            3     12
    2    75286            7     24
    4    27659            3     17
    

提交回复
热议问题