I have a dataframe of 404 rows :
test
1 OTU3978
2 OTU4011
3 OTU4929
4 OTU4317
5 OTU4816
6 OTU3902
I have another dataframe of 1105854 rows :
var1 var2 corr
1 OTU3978 UniRef90_A0A010P3Z8 0.846
2 OTU4011 UniRef90_A0A010P3Z8 0.855
3 OTU4929 UniRef90_A0A010P3Z8 0.829
4 OTU4317 UniRef90_A0A011P550 0.850
5 OTU4816 UniRef90_A0A011P550 0.807
6 OTU3902 UniRef90_A0A011QPQ2 0.836
I would like to keep the rows of the second dataframe where the values of the first dataframe are found. For example, with my example, all the rows of the second dataframe should be saved.
The match between the two dataframes is done on the first column of the second dataframe. For example, the value OTU3978
(1st df) may be found several times in the first column of the 2nd df.
I tried to make a nested loop but without any success..