Add a column in dataframe based on another column

You can check if Set(A.IID) == Set(B.IID)