When matching two df
s (say A
and B
) on values of a column called id_number
, I am trying to identify rows in A
, which cannot find a matching id number in B
, e.g. A
is like,
id_number name
1 a
2 b
3 c
B
is like,
id_number year
1 2007
2 2010
4 2008
I want to create a boolean column called has_b
in A
, result in,
id_number name has_b
1 a True
2 b True
3 c False
I am wondering how to achieve the above dataframe.