lgdcm 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
34 NA NA 1 NA NA NA NA NA NA NA NA NA NA NA NA NA
36 NA NA 1 NA NA NA NA NA NA NA NA NA NA NA NA NA
40 NA NA 1 1 NA NA NA NA NA NA NA NA NA NA NA NA
41 NA NA NA NA 3 NA NA NA NA NA NA NA NA NA NA NA
42 NA NA NA NA 7 NA NA NA NA NA NA NA NA NA NA NA
43 NA NA NA 1 6 NA NA NA NA NA NA NA NA NA NA NA
....
....
I want to fill up the columns of df1 (0,1,2,,,,15)
with columns from df2 (0,1,2,,,,15) with column 'lgdcm' as the
criterion for matching.
There is a function in excel which does this type of thing, something
like:
SUMIF(range,criteria,sum_range)
Can anyone help with this?
Thanks in advance.