in polars:
df.select(pl.corr(col1, col2))
vs in Julia you have to write your own
function missing_cor(a,b)
mask = (!).(ismissing.(a) .|| ismissing.(b))
cor(a[mask], b[mask])
end
combine(df, [:col1, :col2] => missing_cor)
in polars:
df.select(pl.corr(col1, col2))
vs in Julia you have to write your own
function missing_cor(a,b)
mask = (!).(ismissing.(a) .|| ismissing.(b))
cor(a[mask], b[mask])
end
combine(df, [:col1, :col2] => missing_cor)