292-6 Exploring Data with pandas: Intermediate - Working with Integer Labels


It has a single step:

  1. Assign the first five rows of the null_previous_rank dataframe to the variable top5_null_prev_rank by choosing the correct method out of either loc[] or iloc[] .

So I entered:

top5_null_prev_rank = null_previous_rank.iloc[:5]

It tells me it’s wrong. it says the right answer is:

null_previous_rank = f500[f500["previous_rank"].isnull()]
top5_null_prev_rank = null_previous_rank.iloc[:5]

So why didn’t it have a step telling me to create null_previous_rank? There’s no indication that a person has to create it. It simply says to choose loc or iloc to select first 5 rows.

Hey, Heather.

That step isn’t asked because it is already given to you in the display code. The following is what I see when entering that screen:


If you didn’t see this, you either deleted it, or there was some sort of bug (but I don’t remember ever having heard of a bug like this).

If you wish to see this on your end, feel free to reset your progress on this mission and it should also reset your changes.