Trending baby names
Question
You are given the following dataset, containing information on baby names from the U.S. Social Security Administration.
Using the dataset, write code to find the following:
- Number of unique names across the dataset, split by both # of unique male/female names
- Top 10 most popular male and female names, along with their associated counts
- The top 10 most popular names from 2010+, with an associated plot to show the relative growth between names
# Here is code to pull the dataset and relevant libraries
# into a Google Colab or Jupyter notebook to help get you started
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import seaborn as sns
baby_names = pd.read_csv('https://raw.githubusercontent.com/erood/interviewqs.com_code_snippets/master/Datasets/ddi_baby_names.csv')
baby_names.head()
year | name | gender | count | |
---|---|---|---|---|
0 | 1880 | Mary | F | 7065 |
1 | 1880 | Anna | F | 2604 |
2 | 1880 | Emma | F | 2003 |
3 | 1880 | Elizabeth | F | 1939 |
4 | 1880 | Minnie | F | 1746 |