'input
asof_date     timestamp     other  value
2014-01-03    2014-01-04 00     3      3
2014-01-02    2014-01-04 00     2      2
output (expected):
other  value
2014-01-02    NaN    NaN
2014-01-03    NaN    NaN
2014-01-06      3      3'

def test_id_take_last_in_group_sorted(self):

    dates = pd.DatetimeIndex([pd.Timestamp('2014-01-02'), pd.Timestamp('2014-01-03'), pd.Timestamp('2014-01-06')])
    T = pd.Timestamp
    df = pd.DataFrame(columns=['asof_date', 'timestamp', 'other', 'value'], data=[[T('2014-01-03'), T('2014-01-04    00'), 3, 3], [T('2014-01-02'), T('2014-01-04    00'), 2, 2]])
    fields = OrderedDict(self.macro_dshape.measure.fields)
    fields['other'] = fields['value']
    expected = pd.DataFrame(data=[[np.nan, np.nan], [np.nan, np.nan], [3, 3]], columns=['other', 'value'], index=dates)
    self._test_id_macro(df, (var * Record(fields)), expected, self.asset_finder, ('other', 'value'), dates=dates)
