Data Analysis with Python Projects - Demographic Data Analyzer

Tell us what’s happening:

Describe your issue in detail here.
wrote all the necessary codes but its not showing the result. There was no red underline or anything else but its not showing results after i wrote the last line.

please let me know where the problem is.
https://replit.com/@mehrabsami766/boilerplate-demographic-data-analyzer-4#demographic_data_analyzer.py

Your code so far

Your browser information:

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

Challenge Information:

Data Analysis with Python Projects - Demographic Data Analyzer

people_of_india = df[(df["native-country"] == "India") & (df['salary'] == '>50K')]

you have a tipo … “india”

rich_percentage = round((len(df[(df['hours-per-week'] == min_work_hours) & (df['salary'] == '>50K')]) / num_min_workers * 100), 1)

the conditions should be combined using the logical AND operator &

top_IN_occupation = occupations_counts.idxmax()

idmax() returns the index of the first occurrence of the maximum value in each column of the DataFrame.
idxmax() returns the index of the maximum value across rows or columns, depending on the axis parameter.

1 Like

still no changes, shows the same :sob: :sob: :sob:

top_IN_occupation = occupations_counts().idxmax()

return the index of the maximum value in the Series, which is the correct way to identify the top occupation for those who earn >50K in India