I have the below toy dataset which is representative of a much larger data. However, these are the columns of importance. I'm attempting to check whether the values in Dataframe
match the reference dataframes Reference_A
, Reference_B
, and Reference_C
.
DataFrame
group type value
x A Teddy
x A William
x A Lars
y B Robert
y B Elsie
y C Maeve
y C Charlotte
y C Bernard
Reference_A
type value
A Teddy
A William
A Lars
Reference_B
type value
B Elsie
B Dolores
Reference_C
type value
C Maeve
C Hale
C Bernard
Desired output:
group type value check
x A Teddy TRUE
x A William TRUE
x A Lars TRUE
y B Robert FALSE
y B Elsie TRUE
y C Maeve TRUE
y C Charlotte FALSE
y C Bernard TRUE
I posted a similar question here, but realize that TRUE
and FALSE
's might be more effective to check: Check if values of one dataframe exist in another dataframe in exact order. I don't think that order matters, since I can manipulate my data so that all values are unique.