title: Python - Skip header row with csv.reader
body: <p>I tried this proposed solution on a large (7000 line) csv file):
  <a href="https://stackoverflow.com/questions/4796764/read-file-from-line-2-or-skip-header-row?noredirect=1&amp;lq=1">Read File From Line 2 or Skip Header Row`</a></p>
  
  <p>The following code worked but only if I manually remove the header:</p>
  
  <pre><code>RatedTracksFile = open('pyall_rated.csv')
  RatedTracksReader = csv.reader(RatedTracksFile)
  data_list = list(csv.reader(RatedTracksFile))
  eligible1 = open('py_all1.csv', 'a') # open py_all1.csv in append mode
  for i in range(len(data_list)):
      trackrating = int(data_list[i][12])
      ...
  </code></pre>
  
  <p>I tried different ways of adding this suggested code:</p>
  
  <pre><code>with open(fname) as f:
      next(f)
      for line in f:
  </code></pre>
  
  <p>I am new to python and cannot figure out how to add that in. I keep getting the same value type error since it still reads row 1,col 12 (which is a string from the header) and not the integer found on row 2, col 12:</p>
  
  <pre><code>ValueError: invalid literal for int() with base 10: 'GroupDesc'
  </code></pre>
  
  <p>SOLVED: Based on Sphinx' comment below (thanks!).</p>