title: Simple for loop in pandas
body: <p>I have a simple indexing question with respect to pandas. 
  I would like to make a simple for loop to go over numbers 1 to 5. 
  I'm having trouble with pandas indexing in how to do this (although I'm sure its simple!)</p>
  
  <p>My rough code:</p>
  
  <pre><code>def averaged_rel_track(current_tracks, rel_values):
  
      current_tracks['rel_values']=rel_values
      current_tracks=current_tracks.set_index('candidate')
  
      #I would like this line to loop over numbers 1 to 5
      b_1= current_tracks.rel_values.loc['1']
  </code></pre>
  
  <p>What I have tried:</p>
  
  <pre><code>for i in range(1, 6):
      b=current_tracks.rel_values.iloc[i]
  
  for i in range (1, 6):
      b = current_tracks.rel_values[i]
  
  for i in range (1, 6):
     b=current_tracks.rel_values['i']
  </code></pre>
  
  <p>and various other similar variations (including <code>.ix, .iloc, .loc</code>)</p>