I have the following dataframe column
>>> df2['Age]
1    25
2    35
3    48 y
4    34 yea
5    29
...
I just want to keep the number en replace the value in df2['Age] like that
1    25
2    35
3    48
4    34
5    29
...
My code doesn't work :
df2.Age.replace('^.*','^[0-9]*[0-9]',regex=True,inplace=True)
here's the result
 1    ^[0-9]*[0-9]
 2    ^[0-9]*[0-9]
 3    ^[0-9]*[0-9]
 4    ^[0-9]*[0-9]
 5    ^[0-9]*[0-9]
 ...
Thanks for any help in advance
 
     
    