From the course: Python Data Analysis
Unlock the full course today
Join today to access over 22,500 courses taught by industry experts or purchase this course individually.
Challenge: Unisex baby names - Python Tutorial
From the course: Python Data Analysis
Challenge: Unisex baby names
(playful music) - [Narrator] For your challenge, I would like you to find a top ten unisex names and to plot their popularity throughout the years for both the male and female usage of the name. We will define unisex names as those for which the total number of boys and a total number of girls born across all years and within a factor of two. That means that you're going to compute the total number of boys, divide by the total number of girls, and verify that that's between 0.5 and two. Given the technical nature of some Pandas computations, I have some hints for you. Try using DataFrame.groupby(). Take advantage of the fact that Pandas can execute a mathematical operation between two series even if they have different indexes. And finally, if you need to drop not a number, nan values, use DataFrame.dropna.
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.