Issue with assignment 3 question 12

Hey so , I have been facing issue with question 12 and I don’t understand what is the problem , I tired everything but it keeps failing me kaushikc44/pandas-practice-assignment - Jovian this is my book please help me.

Hey Man…
In the question, it is stated that you have to create a Dataframe of 10 countries…
What you are doing is just sorting the whole data of 210 countries and just displaying the top 10

Instead you should do something such that highest_cases_df should contain the top 10 countries and not the whole dataframe in sorted order…

If you still don’t Understand how to do it please don’t hesitate to ask…

kaushikc44/pandas-practice-assignment - Jovian please check , have i done it rite this time ?

I can’t see any changes in Q12…
It is same as previous Link you sent…

this rite ?

for some reason , now my notebook isnt getting evaluted

No…
Just go ahead and type highest_cases_df in one cell and see the result if it does not contain top 10 countries…then it’s wrong
In your case it would show you all 210 countries

but for that i did .head(10) which will show top 10 countries

Yes that’s exactly waht I am saying, you are just showing the top 10 countries and question is asking you to create a Dataframe that contains top 10 countries…and then show it…

What part of this are you not getting ?

"you to create a Dataframe that contains top 10 countries…and then show " this part I am not getting can u show me please

Hey…
So its great that you never asked for the solution even after so many hurdles…it means you want to do it on your own and hats off to you for that…
Actually I was forcing you to see if you would ask directly for the solution or not and you didn’t so keep it up man

Now to your question…
You have done everything super correctly which means you understand the concepts clearly
So the only thing you are missing is present in your notebook’s Q11…
Yes it was there all along…
You just have to change the column for sort_values method

Your code for Q12

Your code for Q11

See the difference…
Hope its clear Now…

I changed that too but i am still getting this
Q12: FAIL
The value of ‘highest_cases_df’ is incorrect

I think your changes are not getting saved…
Just run your whole notebook from top to bottom…
Skip the jovian.commit() cells and when you’re done running your whole notebook just click on the commit button present on the Toolbar

Now submit the link of your assignment
Hopefully it should work…

I did that too still I am failing , I dont understand what am i doing wrong. kaushikc44/pandas-practice-assignment - Jovian. Please help me out

Finally its done , the mistake was what u identified but even after incessant commiting it never got commited.

Hello,

I’m experiencing the same issue with Assignment 3 - Q12: “FAIL The value of ‘highest_cases_df’ is incorrect”.

I’ve checked, double-checked and commited it a million times using both the commit code lines and commit button on the toolbar, yet the evaluation still fails me. I have no idea what’s going on!

My notebook can be accessed HERE

Please advise on what I can do to solve this.

You’re assigning a highest_cases_df together with highest_deaths_df in latter parts of your notebook, which essentially means you’re modifying both of them. That’s why the first variable is incorrect - it has been changed during the execution of notebook.

1 Like

Thank you, I don’t think I would’ve been able to spot that mistake by myself. All good now, cheers.