I know this way to convert a column of string values to float values:
df = DataFrame(:a => ["2,2", "3,3"])
df.a = parse.(Float64, replace.(df.a, (','=>'.',)))
But how to convert a column with missing values?
df = DataFrame(:a => ["2,2", missing]
I've tried passmissing but it seems not time and memory optimized:
julia> @time passmissing(v->parse(Float64, replace(v, (','=>'.')))).(df.a)
0.140616 seconds (143.84 k allocations: 7.424 MiB)
2-element Array{Float64,1}:
2.2
3.3