Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Data Analysis Preparing Data for Analysis Data Cleaning Cleaning A CSV Part 3

I got an error when running data[data["Type"].str.contains("Posion", regex=False)] command.

Hello.

I got an error when running data[data["Type"].str.contains("Posion", regex=False)] command, as shown below.

Please help fix this error. Thanks.

https://imgur.com/f3QHCvp

1 Answer

Megan Amendola
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree seal-36
Megan Amendola
Treehouse Teacher

Hi! The error message is saying that there are still NA/NAN values that need to be fixed before this can be run. I believe those values are tackled in an earlier step by replacing the NA/NAN with the correct values from the Pokemon website. Check your earlier steps and make sure all the NA/NAN values have been tackled first and then try running this step again. Post up your code and we can take a better look.