Suppose, I have a pandas dataframe consisting many rows for product name and columns describing their respective features. And they add some numbering system like 1., 2.,3.,... or a),b),c)....or (i),(ii),(iii),... etc. Now I want to remove them in data frame.
df.replace(regex=True, inplace=True, to_replace=r'["(i*)"|i*.|(a-zA-Z).|("("a-zA-z")")]', value=r'')
but the code is not working. It deletes all i's from the answers eg. consider becomes consder and I can remove a., b. etc if I give it individually i.e., to_replace=r'[a.|b.|A.|B.] but if the pattern is given, it's not working.
how can I remove '(i)', '(ii)', '(iii)' and '(a)', '(A)', 'a.', 'A.' ranges from A-Z and i for one or more with regex pandas dataframe?
Example
INPUT
(i) The cow has four legs. (ii) The cow eats grass. (iii) Cow gives us milk.
OR
a.The cow has four legs. b.The cow eats grass. c.Cow gives us milk.
OUTPUT
The cow has four legs. The cow eats grass. Cow gives us milk.