I have 2 df.
df1 has records of actions performed by users, and df2 has actions owned by users. compare particular action field with its respective owner field and flag with boolean value. Can this be done without using loops for each filed and action for user. Please help!!
df1 =
owner field value
0 Rick cin 234011
1 Daryl email [email protected]
2 Negan phone 9087654
3 Carol address Hilltop
df2 =
owner cin email phone address
0 Rick 543216 [email protected] 9654356 Alexandria
1 Daryl 675432 [email protected] 9876590 kingdom
2 Negan 234123 [email protected] 9087654 Ocean side
3 Carol 0987809 [email protected] 9076535 Atlanta
Expected Result =
owner field value Flag
0 Rick cin 234011 False
1 Daryl email [email protected] True
2 Negan phone 9087654 True
3 Carol address Hilltop False
Since Daryl and Negan owns those entities, we flagged them true. I have tried using merge and getting the identical entities but it needs to be looped across all fields and values.
Any help is appreciated Thanks !