using the variables already defined
dff = DataFrame(ind = full_inds, vals=0.);
sort(combine(groupby(vcat(df,dff),:ind), :vals=>sum=>:vals))
or
dff1 = DataFrame(ind = full_inds, vals=missing);
sort(combine(groupby(vcat(df,dff1),:ind), :vals=>(x->(coalesce(x...)))=>:vals))
or (*)
j=1
for i in 1:length(dff.ind)
global j
if df.ind[j]==dff.ind[i]
dff.vals[i]=df.vals[j]
if j<length(df.ind)
j=j+1
end
end
end
or, as very last resource ,
map(x-> x.ind in df.ind ? x.vals= df[df.ind.==x.ind,:vals][1] : x.vals, eachrow(dff))
(*)
I tried to check this code (to see how, step after step, things are going) using debug under vscode environment. But failed.
this was my first attempt at using debugging.
Where can I get help on this topic?