title: python: how to delete row and modify specific list string from CSV
body: <p>This is my first time posting a question so I apologise in advance if I make any mistakes.</p>
  
  <p>I am currently attempting to create a custom python program (pretty much a parser) that takes in data as such:</p>
  
  <pre><code>junk
  junk
  junk
  junk
  junk
  junk
  fields       title   title   title
  data_type   d_type  d_type  d_type
  data1   data2    data 3
  data4   data 5   data6
  data7   data8    data9
  junk
  </code></pre>
  
  <p>Where my desired output is:</p>
  
  <pre><code>title   title   title
  data1   data2   data3
  data4   data5   data6
  data7   data8   data9
  </code></pre>
  
  <p>Here is the working portion of my code that I have thus far:</p>
  
  <pre><code>import csv
  import itertools
  with open('file.log','rb') as csvfile:
      rowlist = csv.reader(csvfile, delimiter = '\t')
      for row in itertools.islice(rowlist,6,12):   
      print row
  </code></pre>
  
  <p>Whenever the above code is run it produces a series of lists as seen here</p>
  
  <pre><code>['fields','title1', 'title2', 'title3']
  ['data_type','d_type','d_type', 'd_type']
  ['data1', 'data2', 'data3']
  ['data4', 'data5', 'data6']
  ['data7', 'data8', 'data9']
  </code></pre>
  
  <p>The the first data entry (data1, data4, data7) in the list is always a number whereas the other data entries may be any string/number/character. </p>
  
  <p>The <code>itertools</code> has solved cutting off the top and bottom of the file, however I am still struggling to</p>
  
  <ul>
  <li>delete the "data_type line" </li>
  <li>removing 'fields', that is:
  ['fields','title1', 'title2', 'title3']----->['title1', 'title2', 'title3']</li>
  </ul>
  
  <p>I have seen some solutions that remove lines/overwrite line however, I  do not have a lot of memory to spare thus I must keep opening/closing/writing to a minimum. Any and all help is extremely appreciated.</p>