title: Using csv modele to extract specific lines of text from a larger file
body: <p>So I'm extracting the lines that I want from this larger file using this program:</p>
  
  <pre><code>import csv
  
  name = ['NAMETHEFIRST,' 'NAMEANOTHERNAME ']
  data = csv.reader(open('C:\\bigfile.csv'))
  
  with open('C:\\smalldataset.xcl','w') as outf:
      csv.writer(outf).writerows(l for l in data if l[0] in name)
  </code></pre>
  
  <p>The program runs. However I am only getting the line of data from <code>NAMETHEFIRST</code> and I get no data from <code>NAMETHEOTHERNAME</code> written to my small dataset file. This works exactly as I want printing all relevant info from the large data set of the line of data for NAME THE FIRST but i get no information from the second nametheother name written to the smaller file. Why isn't this working?</p>