I’m struggling with the demographic analysis.
I cannot figure out how to get the answer without forming a dataframe.
I get Iran and the percentage correct but its set in table. Please help!. TIA!!
Can you show your result? It looks like you should get the result in the correct way.
Did you try to split the sum into 2 parts? this might help you finding out where it goes wrong. Something like
Well…you are right: those are the correct answers (Iran and 41,9%), but repeated a lot. It cannot be right that the percentage is the same for all those categories, which is suggested by the current results, so there must be something off in your code.
Can you find a way to have the answer showing up only once? Most likely by adjusting the .count a little