I have two pandas dataframes. One is the source and the other is the destination. I want to update based on multiple conditions the values of both dataframes. source dataframe look like this:
Old_ID New_ID DATE dt_insert
FIRM345 FIRM21 21.11.19 11.11.19
FIRM321 FIRM41 19.10.19 18.10.19
destination dataframe looks like this
Old_ID New_ID DATE
FIRM345 FIRM21 21.11.19
FIRM321 FIRM41 19.10.19
i want to know if there is a way to apply the following logic without using loops:
if src.old_ID == dest.old_id AND src.new_id == dest.new_id AND src.date == dest.date
THEN dest.dt_insert = src.date
ELSE append src row to destination dataframe