title: Pandas Keyerror in Simple calling of array elements
body: <p>I am loading a .csv from Pandas. It has a column for country, month, year, and date. Since I'm only interested in these, I overwrite the imported dataframe with a simpler version.</p>
  
  <pre><code>df = pd.read_csv('data.csv')
  idx_USA = df['Country'] == 'United States'
  df = df.loc[:,['Year','Month','Date']]
  print(df[:4])
  </code></pre>
  
  <p>This yeilds</p>
  
  <pre><code>   Year Month Date
  1  2007    1   1
  2  2004     10   2
  4  1999     10   14
  7  2000     10   5
  </code></pre>
  
  <p>Now,oddly, when I try to access the years in a loop, I get a keyerror! This is so simple-- what is going on? Thanks.</p>
  
  <pre><code>for i in range(1,N):
      print "Yr = ", df['Year'][i]
  
  
  Yr =  2007
  Yr =  2004
  Yr = 
  Traceback (most recent call last):
    File "testimport.py", line 19, in &lt;module&gt;
      print "Yr = ", df['Year'][i]
    File "/usr/lib/python2.7/dist-packages/pandas/core/series.py", line 491, in __getitem__
      result = self.index.get_value(self, key)
    File "/usr/lib/python2.7/dist-packages/pandas/core/index.py", line 1032, in get_value
      return self._engine.get_value(s, k)
    File "index.pyx", line 97, in pandas.index.IndexEngine.get_value (pandas/index.c:2957)
    File "index.pyx", line 105, in pandas.index.IndexEngine.get_value (pandas/index.c:2772)
    File "index.pyx", line 149, in pandas.index.IndexEngine.get_loc (pandas/index.c:3498)
    File "hashtable.pyx", line 382, in pandas.hashtable.Int64HashTable.get_item (pandas/hashtable.c:6930)
    File "hashtable.pyx", line 388, in pandas.hashtable.Int64HashTable.get_item (pandas/hashtable.c:6871)
  KeyError: 3
  </code></pre>