Instruction "Use the indexes to assign just the countries in North America.." was confusing

Screen Link:

My Code: As per the instruction, I extracted “just the countries in North America” like so



4 Canada
14 United States
Name: Country, dtype: object

The instruction actually meant for us to select the data for those index values(not just the countries as the instruction seems to read)

north_america = happiness2015.iloc[[4,14]]

Then select the data for the North America group only using get_group()
And then compare the two dataframes before testing that they are equal

1 Like