I have a dataframe with columns containing strings with newline, break takgs and list numbering:
df['Side_Effects'][0]
'1.Nausea\n<br/>2.Vomiting\n<br/>3.Diarrhoea\n<br/>4.Anorexia\n<br/>5.Malaise\n<br/>6.Fever\n<br/>7.Pruritis\n<br/>8.Rash\n<br/>9.Headache\n<br/>10.Pharyngitis\n<br/>11.Cough\n<br/>'
First I have to remove the numberings, newline and br tags from all the strings of column. I tried:
df['Side_Effects'].replace(r'\\n',' ', regex=True, inplace=True)
and this:
df['Side_Effects'] = df['Side_Effects'].str.replace('</br>','')
but nothing seems to work... Would appreciate any help !!!