I have a column of a pandas dataframe (df
). It looks like this:
Mese
__________
{12313}Luglio
{34}Maggio
I was trying to use regex to get rid of the {}
and everything in between:
df['Mese']=[re.sub(r'^{d+}','', str(x)) for x in df['Mese']]
It does not work. Any help?