Data Analysis - Project - My results are correct but am still getting an error

Here’s the link to my repl : https://repl.it/@HernanTeran/boilerplate-demographic-data-analyzer#demographic_data_analyzer.py

My only error seems to be something wrong with the percentage_bachelors result. I have the right answer thought. Thank you to anybody who helps!

1 Like

hey the code is correct but its downloading numpy,pandas and more for your python project

ok got it the if statements wrong

Hey! Thank you for replying. I don’t understand what you’re talking about though. Do you mean the if statement used to check my code? Or something that I wrote?

yes check the if statement

But that all falls under the comment that says to not modify anything below the line. I’ll try it out though!

oh i think i will not get the solution im really very sorry

No problem thank you for your time :slight_smile:

1 Like
ValueError: The truth value of a Series is ambiguous....

This error in your test is trying to tell you can’t compare a pandas series in a comparison with a number (16.4 in the test). in other words, you’re providing a series to the test to compare with a number. If you look at the report output,

Percentage with Bachelors degrees: Bachelors    16.4

you don’t just have the number 16.4, but the series name too. You need to just have the number in your percentage_bachelors variable.

Thank you for replying! Yes I’ve been googling how to round a float64 but I guess that’s not possible. So I’m switching up various things for that piece of code to see what works.