title: numpy loadtxt skip first row
body: <p>I have a small issue when I'm trying to import data from CSV files with numpy's loadtxt function. Here's a sample of the type of data files I have. </p>
  
  <p>Call it 'datafile1.csv':</p>
  
  <pre><code># Comment 1
  # Comment 2
  x,y,z 
  1,2,3
  4,5,6
  7,8,9
  ...
  ...
  # End of File Comment
  </code></pre>
  
  <p>The script that I thought would work for this situation looks like:</p>
  
  <pre><code>import numpy as np
  FH = np.loadtxt('datafile1.csv',comments='#',delimiter=',',skiprows=1)
  </code></pre>
  
  <p>But, I'm getting an error:</p>
  
  <pre><code>ValueError: could not convert string to float: x
  </code></pre>
  
  <p>This tells me that the kwarg 'skiprows' is not skipping the header, it's skipping the first row of comments. I could simply make sure that skiprows=3, but the complication is that I have a very large number of files, which don't all necessarily have the same number of commented lines at the top of the file. How can I make sure that when I use loadtxt I'm only getting the actual data in a situation like this?</p>
  
  <p>P.S. - I'm open to bash solutions, too. </p>