I tried this :
res = df1[~(getattr(df1, 'A').isin(getattr(df2, 'A')) & getattr(df1, 'C').isin(getattr(df2, 'C')))]
It works BUT the list of columns is variable in this example columns = ['A', 'C'] how can I loop over it to get the above expression dynamically according to the values of the list 'columns'
exp: df1:
A B C D
0 oo one 0 0
1 bar one1 1 2
2 foo two2 2 4
3 bar one1 3 6
4 foo two 4 8
5 bar two 5 10
6 foo one 6 12
7 fowwo three 7 14
df2:
A B C D
0 oo one 0 0
2 foo two2 2 4
3 bar one1 3 6
4 foo two 4 8
5 bar two 5 10
6 foo one 6 12
7 fowwo three 7 14
res:
A B C D
1 bar one1 1 2