I have a column with a string containing letter with a number. The number is sometimes with and sometimes without a decimal point. I want to convert the number to float. example dataframe:
df = pd.DataFrame({'colA': ['q7.8', 'g5.3', '4.5r', 'john7']})
The updated column should contain: 7.8, 5.3, 4.5 7.0
.
There are no systemic rules for the number of letters and their location.
Thanks