I have 2 data sets with 75% similar names and 25% unique names. Values don't repeat within the data set ie there are no duplicate values within data set.
I want to compare both data sets, and delete unique values from each data set, so that both data sets have names of same group of individuals only. They will remain 2 separate data sets, I don't want to merge or append them.

How should I go about doing it?

Data set Before
Dataset 1 Dataset 2
A B
B G
C A
D E
F C
L

Data set After
Dataset 1 Dataset 2
A B
B A
C C