title: Manipulating/Filtering CSV files python/pandas
body: <p>I have two csv files representing the same data  : <code>source1.csv</code> and <code>source2.csv </code></p>
  <p><code>source1.csv</code> looks like this:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>id</th>
  <th>name</th>
  <th>url</th>
  <th>link</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>1111</td>
  <td>Alex</td>
  <td>aaaa</td>
  <td>eeee</td>
  </tr>
  <tr>
  <td>2222</td>
  <td>Dan</td>
  <td>bbbb</td>
  <td>ffff</td>
  </tr>
  <tr>
  <td>3333</td>
  <td>Jack</td>
  <td>cccc</td>
  <td>gggg</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p><code>source2.csv</code> looks like this: (where both columns <code>url</code> and <code>link</code> are empty)</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>location</th>
  <th>id</th>
  <th>url</th>
  <th>name</th>
  <th>link</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>xxxx</td>
  <td>1111</td>
  <td></td>
  <td>Alex</td>
  <td></td>
  </tr>
  <tr>
  <td>xyxy</td>
  <td>9999</td>
  <td></td>
  <td>George</td>
  <td></td>
  </tr>
  <tr>
  <td>zyzy</td>
  <td>8888</td>
  <td></td>
  <td>Sam</td>
  <td></td>
  </tr>
  <tr>
  <td>zzyy</td>
  <td>2222</td>
  <td></td>
  <td>Dan</td>
  <td></td>
  </tr>
  <tr>
  <td>xxyy</td>
  <td>7777</td>
  <td></td>
  <td>Adam</td>
  <td></td>
  </tr>
  <tr>
  <td>xzyz</td>
  <td>3333</td>
  <td></td>
  <td>Jack</td>
  <td></td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>Right now, I want to go over the <code>source1.csv</code> file and read the data somehow, then populate the rows in <code>source2.csv</code> with corresponding values for the <code>url</code> and <code>link</code> columns based on the value of the unique field <code>id</code>, so that I get something like this:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>location</th>
  <th>id</th>
  <th>url</th>
  <th>name</th>
  <th>link</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>xxxx</td>
  <td>1111</td>
  <td>aaaa</td>
  <td>Alex</td>
  <td>eeee</td>
  </tr>
  <tr>
  <td>xyxy</td>
  <td>9999</td>
  <td></td>
  <td>George</td>
  <td></td>
  </tr>
  <tr>
  <td>zyzy</td>
  <td>8888</td>
  <td></td>
  <td>Sam</td>
  <td></td>
  </tr>
  <tr>
  <td>zzyy</td>
  <td>2222</td>
  <td>bbbb</td>
  <td>Dan</td>
  <td>ffff</td>
  </tr>
  <tr>
  <td>xxyy</td>
  <td>7777</td>
  <td></td>
  <td>Adam</td>
  <td></td>
  </tr>
  <tr>
  <td>xzyz</td>
  <td>3333</td>
  <td>cccc</td>
  <td>Jack</td>
  <td>gggg</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>How can I do this?</p>