Demographic Data Analyzer: .isin not working properly

Hi people!
I’m trying to use the .isin function to filter some data but it always returns every item as false, when i use str.contains it works just fine, what am I doing wrong?

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0

Challenge: Demographic Data Analyzer

Link to the challenge:

Hi, you need to add .loc then you can obtain the data as you need.
higher_education = df.loc[df[‘education’].isin([‘Bachelors’, ‘Masters’, ‘Doctorate’])]

1 Like