I have a master dataframe with two sets of values:
df1 = pd.DataFrame({\'id1\': [1, 1, 2, 2], \'dir1\': [True, False, True, False],