In [1]:
sys.path.append(os.path.join(os.path.abspath('../..'), 'src'))
sys.path.append(os.path.join(os.path.abspath('../..'), 'data'))
In [2]:
import pandas
In [3]:
import utils
In [4]:
rep_data = utils.load_rep_data()
In [5]:
rep_data.head()
Out[5]:
In [6]:
sen_data = utils.load_senator_data()
In [7]:
sen_data.head()
Out[7]:
In [8]:
sen2016 = utils.load_election_data('senate')
In [9]:
sen2016.head()
Out[9]:
In [10]:
sen2016.shape
Out[10]:
In [11]:
sen2016.ix[0].to_dict()
Out[11]:
In [12]:
hou2016 = utils.load_election_data('house')
In [13]:
hou2016.head()
Out[13]:
In [14]:
hou2016.shape
Out[14]:
In [15]:
hou2016.ix[0].to_dict()
Out[15]:
In [16]:
sen2014 = utils.load_election_data('senate', '2014')
In [17]:
sen2014.head()
Out[17]:
In [18]:
sen2014.shape
Out[18]:
In [19]:
sen2014.ix[0].to_dict()
Out[19]:
In [20]:
hou2014 = utils.load_election_data('house', '2014')
In [21]:
hou2014.head()
Out[21]:
In [22]:
hou2014.shape
Out[22]:
In [23]:
hou2014.ix[0].to_dict()
Out[23]:
In [ ]: