convert id to dataframe index