Assignment 3 -Question 11 - Not Working

Dear guys ,
I am currently struggling with Question 11 of Assignment 3 .
I have tried to fixed my code several times but there was no result .

Here is the link to my notebook :

Q11: Create a dataframe with 10 countires that have highest number of tests per million people.

In [273]:

highest_tests_df = combined_df.sort_values( 'tests_per_million', ascending = False ).head(10)[['location','tests_per_million']]

In [274]:



location tests_per_million
197 United Arab Emirates 725696.635121
14 Bahrain 657527.137965
115 Luxembourg 616349.508607
122 Malta 427004.183096
53 Denmark 422621.755488
96 Israel 271962.665303
89 Iceland 260304.761905
157 Russia 254750.159763
199 United States 253467.507769
10 Australia 245326.517406

Could you point out for me where is the mistake ?
Many thanks .
Stay safe during the pandemic .

What do you mean by “no result”? There seems to be an output, everything works, no errors.


It is the only problem that I did not pass after a few submissions .
So maybe I want to ask for the possible errors in my solution .
Please point out my mistake .
Thanks for replying .

You should keep the dataframe without any modification (selecting columns). Otherwise the Assignment AutoEvaluator™ will get confused and mark it as fail.

As Sebastian Sir pointed out…You need to keep your dataframe without any modifications

So in your notebook in the Second Last optional question you have changed the value of highest_tests_df that is why you are getting the FAIL result…

The code cell I am talking about is…

Just change the name of variable in the optional question and re-submit…

Hope it helps…
You too stay safe…

I have passed . Thank you so much !

1 Like

I have passed . Thank you so much , sir !

1 Like