How can I delete a specific data from all rows in an ecxel file using python?
Like the "-" data in rows
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.