Baby names

Question

You are given a data set of Baby names. Using this, write code to determine what the top boy and girl names were in 2009.

Below is code to import the dataset into a dataframe, to help get you started:

#importing libaries
import numpy as np
import pandas as pd

#reading csv into a dataframe
baby_names = pd.read_csv('https://raw.githubusercontent.com/guipsamora/pandas_exercises/master/06_Stats/US_Baby_Names/US_Baby_Names_right.csv')

#viewing dataframe
baby_names.head()

The solution will be Python code which walks through the logic and calculation.

Solution

Access restricted

Subscribe to premium account to see the solution.

Get premium now