-
-
Save heath/89e2fb5665076f816b5f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
STATE | SEX | AGE | POP2000 | POP2008 | |
---|---|---|---|---|---|
Alabama | M | 0 | 30479 | 32055 | |
Alabama | M | 1 | 29904 | 32321 | |
Alabama | M | 2 | 30065 | 31789 | |
Alabama | M | 3 | 29932 | 31371 | |
Alabama | M | 4 | 30319 | 31164 | |
Alabama | M | 5 | 31127 | 31049 | |
Alabama | M | 6 | 31466 | 30960 | |
Alabama | M | 7 | 32287 | 32459 | |
Alabama | M | 8 | 32497 | 31586 | |
Alabama | M | 9 | 33361 | 30975 | |
Alabama | M | 10 | 34488 | 31126 | |
Alabama | M | 11 | 32884 | 31006 | |
Alabama | M | 12 | 32417 | 31283 | |
Alabama | M | 13 | 32621 | 32076 | |
Alabama | M | 14 | 32644 | 32309 | |
Alabama | M | 15 | 33070 | 33061 | |
Alabama | M | 16 | 32544 | 33132 | |
Alabama | M | 17 | 32822 | 33595 | |
Alabama | M | 18 | 32881 | 34384 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
data = [] | |
with open("../CENSUS_STATEAGESEX.csv", 'rb') as csvfile: | |
csvreader = csv.reader(csvfile, delimiter=',') | |
for row in csvreader: | |
# get_age_range_function <-- TODO | |
if row[0] in data:: | |
#TODO | |
# get the age range associated with the row | |
else: | |
data[row[0]] = { | |
"10": {}, | |
"20": {}, | |
"30": {}, | |
"40": {}, | |
"50": {}, | |
"60": {}, | |
"70": {}, | |
"80": {}, | |
"90": {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment