Home > other >  How to delete a specific data from ecxel - python
How to delete a specific data from ecxel - python

Time:05-19

How can I delete a specific data from all rows in an ecxel file using python?

Like the "-" data in rows

enter image description here

CodePudding user response:

If you only want to remove them and leave them blank you could use a replace

df = df.replace('-', '')

If you are looking to remove the entire row/column that contain a '-' please specify that and the code can be updated.

  • Related