0

Delete Dynamic values from rows in Excel sheet with Numpy

I tried using Numpy to delete

df['Requirement'].replace([',,',','], " ", inplace=True)

DS  Requirement
L1      ,,
L2      ,
L3      ,,,
L4      ,,,,

I have a above excel sheet and converting to DF, So using Numpy I am able to replace all the column values which are (Single Comma , double comma, Triple Comma and So on). Basically I want to make all the column values which having commas. Its all dynamic because it can be 1 comma or N number of comma's

Not getting any idea how to dynamically remove comma from column values.

Can anyone share some idea or I should go with manually check and make empty all desired column values?

Sandy
  • 261
  • 1
  • 3
  • 13

0 Answers0