I have two dataframes df1
and df2
. df1
has column "ID" while df2
has column "ID_NUMBER".
Here's df1
in comma separated format:
ID, ANIMAL
1, dog
2, alligator
4, cat
5, cougar
And df2
ID_NUMBER, WEIGHT
1, 100
2, 1000
3, 12
5, 125
How do I merge these two datasets on df1$ID
/df2$ID_NUMBER
, keeping only the rows where they have the ID number in common?