title: split file by lines into many different files - name each file with index of original file
body: <p>I have a large .txt file that I wrote to file using </p>
  
  <pre><code>`df.to_csv(header=True,index=True,sep="\t") in python`
  </code></pre>
  
  <p>I would like to split that file into files of len(index) = 2, using linux:</p>
  
  <pre><code>split -d -a 10 -l 2 $FILE ./FILES/file_batch
  </code></pre>
  
  <p>However, instead of creating file_batch0000000001 through file_batch0000159800, I would rather create each file using the first index name from the two lines used from the original file.</p>
  
  <p>e.g,</p>
  
  <pre><code>`FILEoriginal.head()
  out[1]:#           col1   col2   col3 ...
     #index0      val    val2   val3 ...
     #index1      val4   val5   val6 ...
     #index2      val7   val8   val9 ...
     #index3      val10  val11  val12 ...`
  </code></pre>
  
  <p>to:</p>
  
  <pre><code>`ls ./FILES
  index0
  index2`
  </code></pre>
  
  <p>and</p>
  
  <pre><code>`vim ./FILES/index2`
  
  `col   col2  col3
  val7   val8  val9
  val10  val11 val12`
  </code></pre>
  
  <p>I would like the script to have computational efficiency (time) be on the order of the linux 'split' function if possible. i.e., trying to avoid loops. </p>