title: searching for a value in csv and returning the row multiple times
body: <p>i'm a noob trying to learn python,</p>
  
  <p>i am trying to write a script for a CSV file that has 30,000 rows of data.</p>
  
  <p>i would like to look through every row for a number in a column and return the row every time it finds that number.</p>
  
  <p>i have searched and tried many different suggestion and they don't seem to do what i need it to can anyone help me, if i'm not making sense please let me know.</p>
  
  <p>here is what i have so far and it is only returning to headers:</p>
  
  <pre><code>    import csv
  
  with open("test.csv", "r") as input, open ("result.txt","w") as result:
            testfilereader = csv.DictReader(input) 
            Age = 23
            fieldnames = testfilereader.fieldnames
            testfilewriter = csv.DictWriter(result, fieldnames, delimiter=',',)
            testfilewriter.writeheader()      
            for row in testfilereader:
                   for field in row:
                          if field == Age:
                               testfilewriter(row)
  
  
  input.close
  </code></pre>
  
  <p>thanks all</p>