title: Compare two spreadsheets and extract the values
body: <p>I have two spreadsheets with different number of rows and columns.</p>
  
  <p>What I would like to do is to compare both and extract the values of A and B from <code>a1.xlsx</code> that match the column names of <code>a2.xlsx</code> and copy the values to columns C and D in a2.xlsx. I know how to do this in excel with Index-Match but not using Python's Pandas.</p>
  
  <p>spreadsheet 1 (<code>a1.xlsx</code>)</p>
  
  <pre><code>Index   A   B   C
  0   s   0.2 new york
  1   d   1   vienna
  2   g   2   london
  3   c   3   tokyo
  4   r   2   paris
  5   d   1   berlin
  6   a   8   madrid
  7   f   10  seattle
  </code></pre>
  
  <p>spreadsheet 2 (<code>a2.xlsx</code>)</p>
  
  <pre><code>Index   A   B   C   D
  0   dublin  34  x   x
  1   seoul   36  x   x
  2   london  12  x   x
  3   berlin  4   x   x
  4   tokyo   6   x   x
  5   seatte  22  x   x
  </code></pre>