title: Restoring original order of python list after processing?
body: <p><b>Note: </b>This is a toy example that will hopefully illustrate what I am trying to achieve.</p>
  <p>I have a list of strings that I separate into two sub-lists in order to perform different preprocessing steps on. Lets say I have the following list of strings:</p>
  <pre><code>mylist = ['a1','a','a2','b','b2','b3','c','c1','c2']
  </code></pre>
  <p>For simplicity, I want to add a particular sub-string to the beginning of each element depending on whether that element contains a number (in reality, I have a multiple preprocessing steps that necessitates splitting the original list):</p>
  <pre><code>import re
  withNum = [[i,'numPresent_'+i] for i in mylist if re.compile(r'\d').search(i)]
  noNum = [[i,'noNum_'+i] for i in mylist if not re.compile(r'\d').search(i)]
  </code></pre>
  <p>Now that I have my two sub-lists, how can I combine them in a data-frame in a manner that they reflect their original order? Clearly, if I use <code>df.append</code> it will simply stack one on top of the other...</p>
  <pre><code>df = pd.DataFrame().append(withNum).append(noNum)
  </code></pre>
  <p><b>Returns:</b></p>
  <pre><code>-------------------------
      0              1
  -------------------------
   a1         numPresent_a1
   a2         numPresent_a2
   b2         numPresent_b2
   b3         numPresent_b3
   c1         numPresent_c1
   c2         numPresent_c2
   a          noNum_a
   b          noNum_b
   c          noNum_c
  --------------------------
  </code></pre>
  <p>How can I re-order the data-frame so that it reflects the order of the original list?</p>
  <p><b>Intended Outcome:</b></p>
  <pre><code>-------------------------
      0              1
  -------------------------
   a1         numPresent_a1
   a          noNum_a
   a2         numPresent_a2
   b          noNum_b
   b2         numPresent_b2
   b3         numPresent_b3
   c          noNum_c
   c1         numPresent_c1
   c2         numPresent_c2
  --------------------------
  </code></pre>
  <p>I cannot rely on the content of the string itself to inform its position (so sorting alphabetically is out). I can only rely on its original position in the list. I'm hoping there is someway I can create an index that I can sort by after I have merged the two sub-lists.</p>