Screen Link: https://app.dataquest.io/m/343/data-aggregation/6/exploring-groupby-objects
My Code: As per the instruction, I extracted “just the countries in North America” like so
happiness2015.iloc[[4,14]]['Country']
Output:
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