You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Print out all the state names from the csv# Coded in the "object-oriented" stylefrom electiondata import ElectionResultsfilename = '2012_US_election_state.csv'results = ElectionResults(filename)results.load()print "Opened file:"state_names = results.states()for state in state_names: print " "+stateprint "done ("+str(results.state_count())+" lines)"