title: Split large csv file into multiple files and keep header in each part
body: <p>How to split a large csv file (1GB) into multiple files (say one part with 1000 rows, 2nd part 10000 rows, 3rd part 100000, etc) and preserve the header in each part ?</p>
  
  <p>How can I achieve this</p>
  
  <pre><code>h1 h2
  a  aa
  b  bb
  c  cc
  .
  .
  12483720 rows
  </code></pre>
  
  <p>into </p>
  
  <pre><code>h1 h2
  a  aa
  b  bb
  .
  .
  .
  1000 rows
  </code></pre>
  
  <p>And </p>
  
  <pre><code>h1 h2
  x  xx
  y  yy
  .
  .
  .
  10000 rows
  </code></pre>