I have a problem that I think it should be solvable with a loop but I am unsure on how to proceed. I have two datasets: one with two columns of ids corresponding to my parti