Question: Write a python program, baby_names.py, that will rank baby names from a large dataset. The Social Security Admininstration keeps track of the names of babies.
Write a python program, baby_names.py, that will rank baby names from a large dataset. The Social Security Admininstration keeps track of the names of babies. Their data goes back to the early 1900's.
The CSV files are formatted as follows:
WY,F,1910,Mary,27 WY,F,1910,Margaret,22 WY,F,1910,Helen,13 WY,F,1910,Alice,10
The first column is the state, the second is the sex, the third is the year, then the name, and finally the count for that name/sex that year.
Your program will read CSV files formatted like those given, and compute the overall frequency for each name and will output a sorted (descending order of frequency) list of baby names, like so:
914 ["Adam", "M"] 909 ["Angela", "F"] 877 ["Megan", "F"]
where the number is the number of times the name occcured, followed by the name and sex.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
