Hello I have 2 dataframes
DF1
COL1 COL2 COLX
SEQ6 A 1
SEQ2 B 2
SEQ4 C 3
SEQ1 D 4
SEQ7 D 5
DF2
COL1 COL3
SEQ1 Q
SEQ2 L
SEQ3 O
SEQ4 O
SEQ5 M
SEQ6 L
SEQ7 Y
SEQ8 G
and the idea is to change the rownames of the DF1
according to rownames in DF2
. And then sort the rownames in the same way as DF2
The expected result would be :
COL1 COL2 COLX
SEQ1 D 4
SEQ2 B 2
SEQ3 NA NA
SEQ4 C 1
SEQ5 NA NA
SEQ6 A 1
SEQ7 D 5
SEQ8 NA NA
Thank you for your help