0

In the code below I am trying to get top 250 records based on imdb_score and then populate rank to it based on its score. Note I need to populate rank from 1 to 250. All the records will have different rank values. I am getting NaN as value for all rows. Please help.


IMDb_Top_250['rank'] = IMDb_Top_250.nlargest(250,'imdb_score').apply(lambda x: range(1,250))
Celius Stingher
  • 17,835
  • 6
  • 23
  • 53

0 Answers0