title: Vectorized lookup on a pandas dataframe
body: <p>I have two DataFrames . . . </p>
  
  <p><code>df1</code> is a table I need to pull values from using index, column pairs retrieved from multiple columns in df2.</p>
  
  <p>I see there is a function <code>get_value</code> which works perfectly when given an index and column value, but when trying to vectorize this function to create a new column I am failing... </p>
  
  <pre><code>df1 = pd.DataFrame(np.arange(20).reshape((4, 5)))
  
  df1.columns = list('abcde')
  
  df1.index = ['cat', 'dog', 'fish', 'bird']
  
          a   b   c   d   e
  cat     0   1   2   3   4
  dog     5   6   7   8   9
  fish    10  11  12  13  14
  bird    15  16  17  18  19
  
  df1.get_value('bird, 'c')
  
  17
  </code></pre>
  
  <p>Now what I need to do is to create an entire new column on <code>df2</code> -- when indexing <code>df1</code> based on index, column pairs from the <code>animal</code>, <code>letter</code> columns specified in <code>df2</code> effectively vectorizing the <code>pd.get_value</code> function above.</p>
  
  <pre><code>df2 = pd.DataFrame(np.arange(20).reshape((4, 5)))
  
  df2['animal'] = ['cat', 'dog', 'fish', 'bird']
  
  df2['letter'] = list('abcd')
  
      0   1   2   3   4   animal  letter
  0   0   1   2   3   4   cat     a
  1   5   6   7   8   9   dog     b
  2   10  11  12  13  14  fish    c
  3   15  16  17  18  19  bird    d
  </code></pre>
  
  <p>resulting in . . . </p>
  
  <pre><code>    0   1   2   3   4   animal  letter   looked_up
  0   0   1   2   3   4   cat     a        0
  1   5   6   7   8   9   dog     b        6
  2   10  11  12  13  14  fish    c        12
  3   15  16  17  18  19  bird    d        18
  </code></pre>