dfx['colAsum'] = dfx.apply(lambda x: df.loc[(df.date >= x.StartDate) & (df.date <= x.EndDate), 'colA'].sum(), axis=1)