Skip to content

Instantly share code, notes, and snippets.

Last active Nov 11, 2018
What would you like to do?
Case Study - US Births Analysis
# cleaing data
data = data.split("\n")
data = data[1:]
# see what data looks like
for row in data[:10]:
# preliminary analysis
result = {}
for row in data:
year = row.split(",")[0] # year at index 0
birth = int(row.split(",")[4]) # birth at index 4
if year in result:
result[year] += birth
result[year] = birth
# see result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment