can I use Numpy genfromtxt to get names then skip a specifc row before continuing?
<p>I have a series of large CSV files contain sensor data samples.</p>

<p>The format of each file is</p>

<pre><code>Row 0 Column names

Row 1 Column unit of measurement.

Row 2 to EOF: time-stamp of sample was taken,voltage measurement from all sensors.....
</code></pre>

<p>I cannot modify the original file</p>

<p>So i would like to use <code>numpy.gentromtxt(filename,Names=True,delimiter=',',dtype=None)</code></p>

<p>So far to avoid corrupting the output i have skipped the header lines and manually added the column names later. 
This is not ideal as each file potentially a different order of sensors- and the information is there for the taking.</p>

<p>Any help/Direction would be greatly appreciated.</p>

<p>I can see several options:</p>

<ul>
<li><p>Open the file to read just the header line, parse the names yourself; run <code>genfromtxt</code> with the custom names and skip_header</p></li>
<li><p>trick <code>genfromtxt</code> into treating the 2nd line as a comment line</p></li>
<li><p>open the file yourself; pass lines through a filter to <code>genfromtxt</code>.  The filter function would remove the second line.  (<code>genfromtxt</code> works with a list of lines, or anything that feeds it lines).</p></li>
- 
</ul>

python numpy