title: Getting a list of the range of 2 pandas columns
body: <p>I have the following DataFrame (reformatted a bit):</p>
  
  <pre><code>    f_name  l_name      n   f_bought  l_bought
  0   Abraham Livingston  24  1164      1187
  1   John    Brown       4   1188      1191
  2   Samuel  Barret      16  1192      1207
  3   Nathan  Blodget     4   1208      1212
  4   Bobby   Abraham     1   1212      1212
  </code></pre>
  
  <p>I want to create a column, <code>bought</code>, that is a list <code>range(df[f_bought], df[l_bought])</code>.</p>
  
  <p>I've tried:</p>
  
  <pre><code>def getRange(l1,l2):
      r = list(range(l1, l2))
  df.apply(lambda index: getRange(df['f_bond'], df['l_bond']),axis=1)
  </code></pre>
  
  <p>but it results in a TypeError:</p>
  
  <pre><code>"cannot convert the series to &lt;type 'int'&gt;", u'occurred at index 0'
  </code></pre>
  
  <p>I've tried a df.info(), and both columns are type int64.</p>
  
  <p>I'm wondering if I should use something like <code>df.loc[]</code> or similar? Or something else entirely?</p>