I need to update every ID line item in my table with the max(COFlag). 2nd picture is desired output. I've tried: merge(x=DF1, y=DF2, by = 'ID'. I get the error 'by' must specify a uniquely valid column


I need to update every ID line item in my table with the max(COFlag). 2nd picture is desired output. I've tried: merge(x=DF1, y=DF2, by = 'ID'. I get the error 'by' must specify a uniquely valid column


inner_join(df1,df2, by= 'ID') 
gave me my desired output.
