If the data frames are as follows :
df1
column names = UniqueID Age Gender
values = 213,21,F
145,34,M
890,23,F
df2
column names = ID Occupation Bill
145 Teacher 45RS
890 Student 70RS
456 Teacher 90Rs
I want to use a function which finds the common values in "UniqueID" from df1 and "ID" from df2 and gets stored in df3. Also, the only columns which exist in df3 should be of "common ids" and the columns of df2.