Skip to content

Instantly share code, notes, and snippets.

@zstumgoren
Created January 23, 2019 22:24
Show Gist options
  • Save zstumgoren/eafae79cd49c212c3b658bfee074e23e to your computer and use it in GitHub Desktop.
Save zstumgoren/eafae79cd49c212c3b658bfee074e23e to your computer and use it in GitHub Desktop.
Partial script.
import csv
import os
import urllib.request
url = 'https://www.fdic.gov/bank/individual/failed/banklist.csv'
source_file = os.path.expanduser('~/Desktop/failed_banks.csv')
urllib.request.urlretrieve(url, source_file)
with open(source_file, 'r', encoding="latin-1") as failed_banks:
reader = csv.reader(failed_banks)
failed_banks = {}
for row in reader:
if 'Closing Date' in row:
continue
#TODO: WRITE CODE TO UPDATE THE DICTIONARY
# with state abbreviate as the key and the count
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment