“python how to rank only certain rows in dataframe”