How can I merge these two dataframes?
df1
enter image description here
df2
Rule:
- Merge based on callsign and re (if not null). If de and d_runway do not match, add a label indicating a mismatch.
- Merge based on re if callsign is null.
- If both callsign and re are null, merge based on de and d_runway.
There is also a timestamp that plays a key role in merging such that each dataframe has a timestamp and can only be matched if the difference is within 900 seconds
Output
5