I have found this code , and it is working very well.
df1 = pd.DataFrame({'c1': [1, 4, 7], 'c2': [2, 5, 1], 'c3': [3, 1, 1]})
df2 = pd.DataFrame({'c4': [1, 4, 7], 'c2': [3, 5, 2], 'c3': [3, 7, 5]})
set(df1['c2']).intersection(set(df2['c2']))
But I need to compare them with multiple column names like
set(df1['c2']['c3']).intersection(set(df2['c2']['c3']))
But it is not working. How to fix or what is another way to compare them and find similar values ( matches ) ?