title: Import .dat file in Python 3
body: <p>I would like to import a <code>.dat</code> file which includes </p>
  
  <pre><code>lines/header/numbers/lines 
  </code></pre>
  
  <p>something like this example</p>
  
  <pre><code>start using data to calculate something
   x y z g h 
   1 4 6 8 3
   4 5 6 8 9 
   2 3 6 8 5
  end the data that I should import.
  </code></pre>
  
  <p>Now I am trying to read this file, remove first and last lines and put the numbers in an array and do some basic calculation on them, But I could not get rid of the lines. I used <code>data = np.genfromtxt('sample.dat')</code> to import data, but with lines, I cannot do anything. Can anyone help me?</p>