Hi,
I am having trouble understanding why the expected outcome of the question is Iran :
What country has the highest percentage of people that earn >50K and what is that percentage?
If I run the following code :
highest_earning_country = df['native-country'][df['salary'] == '>50K'].value_counts()
We can see that the country with higher number of people earning >50k is the USA , however the expected outcome would be Iran. I don’t get it ?
United-States 7171
? 146
Philippines 61
Germany 44
India 40
Canada 39
Mexico 33
England 30
Cuba 25
Italy 25
Japan 24
China 20
Taiwan 20
Iran 18
South 16
France 12
Puerto-Rico 12
Poland 12
Jamaica 10
El-Salvador 9
Greece 8
Cambodia 7
Hong 6
Yugoslavia 6
Ireland 5
Vietnam 5
Haiti 4
Ecuador 4
Portugal 4
Thailand 3
Guatemala 3
Hungary 3
Scotland 3
Columbia 2
Trinadad&Tobago 2
Laos 2
Peru 2
Dominican-Republic 2
Nicaragua 2
Honduras 1
Name: native-country, dtype: int64