Hi! So I used this code to get the rich_percentage
num_min_workers = df.loc[df[‘hours-per-week’].isin([‘1’]), ‘hours-per-week’].count()
rich_percentage = df.loc[df[‘hours-per-week’].isin([‘1’]), ‘hours-per-week’][df[‘salary’].isin([‘>50K’])].count() / num_min_workers * 100
But the outcome for the rich_percentage is nan% and I’m not sure why. Can someone help enlighten me? Thank you so much!
Challenge Information:
Data Analysis with Python Projects - Demographic Data Analyzer