I have two dataframes and df2 is more columns
If the row in df1 doesn't have in df2, I select it to df3
df1
id colA colB
0 1 4 1
1 2 5 2
2 3 2 4
3 4 4 2
4 5 2 4
df2
id colA colB colC
0 1 4 1 0
1 2 5 2 0
2 5 2 4 0
I want select some rows from df1
df3
id colA colB
0 3 2 4
1 4 4 2
df3=df1.loc[~df1.id.isin(df2.id),].copy()
– BENY