title: Compare two CSV files and search for similar items
body: <p>So I've got two CSV files that I'm trying to compare and get the results of the similar items.
  The first file, hosts.csv is shown below:</p>
  
  <pre><code>Path    Filename    Size    Signature
  C:\     a.txt       14kb    012345
  D:\     b.txt       99kb    678910
  C:\     c.txt       44kb    111213
  </code></pre>
  
  <p>The second file, masterlist.csv is shown below:</p>
  
  <pre><code>Filename    Signature
  b.txt       678910
  x.txt       111213
  b.txt       777777
  c.txt       999999
  </code></pre>
  
  <p>As you can see the rows do not match up and the masterlist.csv is always larger than the hosts.csv file. The only portion that I'd like to search for is the Signature portion. I know this would look something like:</p>
  
  <pre><code>hosts[3] == masterlist[1]
  </code></pre>
  
  <p>I am looking for a solution that will give me something like the following (basically the hosts.csv file with a new RESULTS column):</p>
  
  <pre><code>Path    Filename    Size    Signature    RESULTS
  C:\     a.txt       14kb    012345       NOT FOUND in masterlist
  D:\     b.txt       99kb    678910       FOUND in masterlist (row 1)
  C:\     c.txt       44kb    111213       FOUND in masterlist (row 2)
  </code></pre>
  
  <p>I've searched the posts and found something similar to this <a href="https://stackoverflow.com/questions/5212444/python-comparing-two-csv-files-when-order-of-rows-doesnt-matter">here</a> but I don't quite understand it as I'm still learning python.</p>
  
  <p><strong>Edit</strong> Using Python 2.6</p>