title: Compare two columns in two csv files in python
body: <p>I have two csv files with same columns name:</p>
  
  <ul>
  <li>In file1 I got all the people who made a test and all the status (passed/missed)</li>
  <li>In file2 I only have those who missed the test</li>
  </ul>
  
  <p>I'd like to compare file1.column1 and file2.column1</p>
  
  <ul>
  <li>If they match then compare file1.column4 and file2.column4</li>
  <li>If they are different remove item line from file2</li>
  </ul>
  
  <p>I can't figure how to do that.
  I looked things with pandas but I didn't manage to do anything that works</p>
  
  <p><strong>What I have is:</strong></p>
  
  <p>file1.csv:</p>
  
  <pre><code>name;DOB;service;test status;test date
  Smith;12/12/2012;compta;Missed;01/01/2019
  foo;02/11/1989;office;Passed;01/01/2019
  bar;03/09/1972;sales;Passed;02/03/2018
  Doe;25/03/1958;garage;Missed;02/04/2019
  Smith;12/12/2012;compta;Passed;04/05/2019
  </code></pre>
  
  <p>file2.csv:</p>
  
  <pre><code>name;DOB;service;test status;test date
  Smith;12/12/2012;compta;Missed;01/01/2019
  Doe;25/03/1958;garage;Missed;02/04/2019
  </code></pre>
  
  <p><strong>What I want to get is:</strong></p>
  
  <p>file1.csv:</p>
  
  <pre><code>name;DOB;service;test status;test date
  Smith;12/12/2012;compta;Missed;01/01/2019
  foo;02/11/1989;office;Passed;01/01/2019
  bar;03/09/1972;sales;Passed;02/03/2018
  Doe;25/03/1958;garage;Missed;02/04/2019
  Smith;12/12/2012;compta;Passed;04/05/2019
  </code></pre>
  
  <p>file2.csv:</p>
  
  <pre><code>name;DOB;service;test status;test date
  Doe;25/03/1958;garage;Missed;02/04/2019
  </code></pre>