def test_idadf_head_sorted(self, idadf, df):
    sortIdx = (len(df.columns) - 1)
    sortkey = idadf.columns[sortIdx]
    newidadf = idadf.sort(sortkey)
    ida_head = newidadf.head()
    df_head = df.sort_values(sortkey).head()
    assert (' ORDER BY ' in newidadf.internal_state.get_state())
    assert isinstance(ida_head, pandas.core.frame.DataFrame)
    assert (len(ida_head) == 5)
    assert (ida_head[sortkey].tolist() == df_head[sortkey].tolist())
def test_idadf_head_sorted(self, idadf, df):
    sortIdx = (len(df.columns) - 1)
    sortkey = idadf.columns[sortIdx]
    newidadf = idadf.sort(sortkey)
    ida_head = newidadf.head()
    df_head = df.sort_values(sortkey).head()
    assert (' ORDER BY ' in newidadf.internal_state.get_state())
    assert isinstance(ida_head, pandas.core.frame.DataFrame)
    assert (len(ida_head) == 5)
    assert (ida_head[sortkey].tolist() == df_head[sortkey].tolist())