(Learn data science with Python and R projects)
There seem to be two things wrong with this page. First, taking the average of the ShareWomen values is meaningless, since it doesn’t take into account the size of the samples. The actual average share of women is calculated using
SUM(Women)/SUM(Total) (but forcing this to be a float, rather than an int, I don’t know how to do that yet).
Second, the hint says “Don’t use aliases”, whereas the solution uses an alias.
Your doubt makes sense. Could you please share your feedback with the Content & Product teams of Dataquest? Just click the ? button in the upper-right corner of any screen of the Dataquest learning platform, select Share Feedback, fill in the form, and send it. Thanks!
As for how to force the results being floats rather than integers, use this piece of code: