title: pandas rearranging a data frame
body: <p>I have a data frame that is as follows:</p>
  
  <pre><code>Honda [edit]
  Accord (4 models)
  Civic  (4 models)
  Pilot  (3 models)
  Toyota [edit]
  Prius  (4 models)
  Highlander (3 models)
  Ford [edit]
  Explorer (2 models)
  </code></pre>
  
  <p>I am looking to reshape it such that I get a resulting 2 column data frame as follows:</p>
  
  <pre><code> Honda     Accord
   Honda     Civic
   Honda     Pilot
   Toyota    Prius
   Toyota    Highlander
  </code></pre>
  
  <p>and so on.
  I tried str.split trying to split between edits, but was not successful. Any suggestions are most appreciated! Python newbie here...so apologies if this has been addressed before.
  Thanks!</p>
  
  <p>So far I tried</p>
  
  <pre><code>     maker=car['T'].str.extract('(.*\[edit\])', expand=False).str.replace('\[edit\]',"")
  </code></pre>
  
  <p>This gives me the list of Makers: Honda, Toyota and Ford. However I am stuck at finding a way to extract the models between the makers to create the 2 col DF.</p>