def _down_sample_tick_to_tick(df, target_index, resample_func):
    """Down sampling tick data to a tick based target index."""
    start = target_index[0].asfreq(df.index.freq, how='start')
    end = target_index[-1].asfreq(df.index.freq, how='end')
    new_df = df[start:end]
    new_df = new_df.resample(target_index.freq).agg(resample_func)
    return new_df
