How to remove the characters from the column which consists of digits and characters?
This is the dataset:
Name
0yrs 0mon
11yrs 11mon
2yrs 2mon
3yrs 5mon
This is the expected output:
Name
0.0
11.11
2.2
3.5
This is the actual output:
Name
0.0.
11.11.
2.2.
3.5.
I tried by using the command
df.Name = df.Name.str.replace('\D+','.')