How can we replace missing values with 0.0 for a column in a DataFrame?
missing
0.0
DataFrame
create df with some NAs
df
NA
using DataFrames df = DataFrame(A = 1.0:10.0, B = 2.0:2.0:20.0) df[ df[:B] %2 .== 0, :A ] = NA
you'll see some NA in df... we now convert them to 0.0
df[ isna(df[:A]), :A] = 0
EDIT=NaN→NA. Thanks @Reza
NaN