def merge_dates_df(df, dates_df):
    """Merge the dates by matching on source."""
    df = df.merge(dates_df[['date', 'source', 'task_id']], on='source',
                  how='left', suffixes=('_title', '_date'))
    return df