reindexing the returned dataframe by rank.