Assignment - 3 - 4th question

assignment 3 (4th question) - In this question first using sort_values for ascending order of population. After that for hightest 10 country population I sould use tail instead of head because head will give me result of 10 least population. countries . . Am I right?

That would give you the 10 countries with the highest population. However, the dataframe would still be in ascending order and not descending order. That means the country with the highest population would be the 10th row instead of the first row.

You can pass a parameter to sort_values to sort in descending order and then use head to get the desired result.

1 Like

FAIL
The value of ‘num_countries’ is incorrect
Error: could not JSON serialize output
please help

I am also getting an error in most populus df I didn’t know why it is happening pls help me as I am stuck in that this is my notebook link

What error are you getting? I don’t see any error output in your notebook.

I am not getting any error but in assignment 3 I am getting fail


in que 4 look there is something I am not understanding

You have a typo in variable name, so the automatic assignment evaluation can’t find the answer. Fix the name.

1 Like

Hello @prathamtidke55, as @Sebgolos mentioned you have a typo in variable name. Just change the name from most_populus_df to most_populous_df. We are not allowed to change the variable name in any assignment.