title: How can I delete the top row of my csv file using python?
body: <p>My code extracts information from an xhtml file to csv. Cannot seem to delete the topmost row reading "NYSE,, ,Price,Chg,Chg". Using "del data[0]" for example gets rid of the whole column. Any help is greatly appreciated.</p>
  
  <pre><code>import sys
  import re
  import xml.dom.minidom
  
  document = xml.dom.minidom.parse("2017-11-27-16-20-15.xhtml")
  tableElements = document.getElementsByTagName('table')[2]
  
  for tr in tableElements.getElementsByTagName('tr'):
  data = []
  
  for a in tr.getElementsByTagName('a'):
      for node in a.childNodes:
          if node.nodeType == node.TEXT_NODE:
              data.append(node.nodeValue)
  
  
  for td in tr.getElementsByTagName('td'):
      for node in td.childNodes:
          if node.nodeType == node.TEXT_NODE:
              data.append(node.nodeValue)
  
  del data[-1]
  del data[1]
  del data[1]
  del data[1]
  
  symbol = data[0]
  symm = re.findall(r"\(([A-Za-z0-9_]+)\)", symbol)
  
  sym = (''.join(symm))
  
  company = data[0]
  comp = re.sub("\(.*\)\n","", company)
  
  volume = data[1]
  lst = volume.replace(',', '')
  
  
  price = data[2]
  lstt = price.lstrip('$')
  
  
  change = data[-1]
  
  fullList = [sym] + [comp] + [lst] + [lstt] + [change]
  fullList.insert(0, "NYSE")
  print(','.join(fullList))
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/p5UQQ.png" rel="nofollow noreferrer">output pic</a></p>
  
  <p><a href="https://i.stack.imgur.com/m4kV7.png" rel="nofollow noreferrer">xhtml table(sample pic)</a></p>