2021-05-27

Use a dataframe as a key to fill another according to one row

I am trying fill DF1 into DF2 according to how each row is filled according to DF1$x6. I am using if and ifelse but I have 800+ defined DF1$x6 values and there has to be a better way.

DF1: x1 x2 x3 x4 x5 x6 /n 2 a c a 5 a1 /n o 5 y 7 I a2 /n H 5 a v 3 a3 /n 0 8 I a 3 a4 /n DF2 x1 x2 x3 x4 x5 x6 /n a4 /n a2 /n a4 /n a1 /n a1 /n a4 /n a3 /n



from Recent Questions - Stack Overflow https://ift.tt/3fqQOCA
https://ift.tt/eA8V8J

No comments:

Post a Comment