replace "," by "." in order to treat the quantity as a float

0

A column called age , which must contain only data int , has 2 fields with values separated by "," the question is that I need to pass that character to "." to be able to work, I leave what I have so far

df['age'].replace(',' , '.', inplace=True) 

df['age'] 

the result is:

8        41
9       NaN
10       19
11      NaN
12       16
13     **38,5**

some idea thank you very much ..

    
asked by rose dewitt 30.11.2018 в 20:20
source

0 answers