def _resample_date_offset_to_date_offset(df, target_index, resample_func):
    """Down sample a date offset data to a target index with date offset."""
    new_df = df.resample(target_index.freq).agg(resample_func)
    new_df = new_df[target_index[0]:target_index[-1]]
    return new_df
