Demographic Data Analyzer - highest percentage of people

What country has the highest percentage of people that earn >50K?
My answer is United Status. However, system suggest Its Iran. I’m confused.
Any help ?

My code:
df.loc[df[‘salary’] == ‘>50K’,‘native-country’].value_counts().idxmax()

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.84 Safari/537.36

Challenge: Demographic Data Analyzer

Link to the challenge:

For a start, those aren’t percentage…
You are calculating the country with the most rich folks. You are supposed to get the country with the highest percentage of rich folks IN THAT COUNTRY.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.