Iterate through and compare customer data from two .csv files, export single file with most recent updated customer information (Python)
<p>I have two .csv files with the following customer information as headers:</p>

<p>First name<br>
Last name<br>
Email<br>
Phone number<br>
Street name<br>
House number<br>
City<br>
Zip code<br>
Country<br>
Date -- last time customer information was updated  </p>

<p>I want to go through both files, and export a single file with the most recent customer information.</p>

<p>For example,</p>

<p>File 1 contains the following for a single customer:</p>

<p>First name - John<br>
Last name - Smith<br>
Email - jsmith@verizon.net<br>
Phone number - 123 456 7890<br>
Street name - Baker St<br>
House number - 50<br>
City - London<br>
Zip code - 12345<br>
Country - England<br>
Date - 01-06-2016 (DD-MM-YYYY)  </p>

<p>And file 2 contains the following information for the same customer:</p>

<p>First name - John<br>
Last name - Smith<br>
Email - jsmith@gmail.com<br>
Phone number - 098 765 4321<br>
Street name - Baker St<br>
House number - 50<br>
City - London<br>
Zip code - 12345<br>
Country - England<br>
Date - 01-10-2016  </p>

<p>I want to use the information for this customer from file 2 in the exported file.</p>

<p>Any suggestions how to go about doing this in Python?</p>

<p>Thanks!</p>

<p>I suggest you to use pandas. You may create two DataFrame's and after that you may update first  frame by the second. I found a question which looks similar like your(<a href="http://stackoverflow.com/questions/7971513/using-one-data-frame-to-update-another"><code>http://stackoverflow.com/questions/7971513/using-one-data-frame-to-update-another</code></a>  ) I hope that it can help you.</p>

python csv