'How to delete a specific data from ecxel - python

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



Solution 1:[1]

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.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 ArchAngelPwn