Why my all ranking columns are 0 and NAN?

I did not change the original data set value, i just follow the standard answer to do my project, but all my ranking columns are either 0 or NAN. why?

Thank you.

Screen Link: https://app.dataquest.io/m/201/guided-project%3A-star-wars-survey/5/cleaning-the-ranking-columns

My Code:

#Rename the ranking columns 
star_wars.rename(columns={
        "Please rank the Star Wars films in order of preference with 1 being your favorite film in the franchise and 6 being your least favorite film.": "ranking_1",
        "Unnamed: 10": "ranking_2",
        "Unnamed: 11": "ranking_3",
        "Unnamed: 12": "ranking_4",
        "Unnamed: 13": "ranking_5",
        "Unnamed: 14": "ranking_6"
        },inplace=True)

#change ranking to numeric
star_wars[star_wars.columns[9:15]] = star_wars[star_wars.columns[9:15]].astype(float)

star_wars['ranking_2'].value_counts(dropna=False)
1 Like

I ran your code, but I didn’t encounter any problem. Kindly restart and run the code over again. Are you talking about column name or the values because the column name is getting renamed with the ones we define as ranking.

1 Like

I restarted it and reran it and the problem is gone.
Thank you!!