title: Column renumbering Pandas Dataframe
body: <p>I have a simple dataframe like:</p>
  
  <pre><code>&gt;&gt;&gt; df_test = pd.DataFrame(columns=["ID" ])
  &gt;&gt;&gt; df_test["DATE"] = [ '2001-02-01', '2001-03-01', '2001-02-15', '2001-03-15', '2001-02-15', '2001-03-30']
  &gt;&gt;&gt; df_test['ID'] = [1,2,3,1,5,4]
  &gt;&gt;&gt; df_test
      ID        DATE
  0   1  2001-02-01
  1   2  2001-03-01
  2   3  2001-02-15
  3   1  2001-03-15
  4   5  2001-02-15
  5   4  2001-03-30
  </code></pre>
  
  <p>I would like to reorder the ID columns as follow: </p>
  
  <pre><code>&gt;&gt;&gt; df_test
      ID        DATE
  0   1  2001-02-01
  1   1  2001-03-01
  2   1  2001-02-15
  3   1  2001-03-15
  4   4  2001-02-15
  5   4  2001-03-30
  </code></pre>
  
  <p>basically each time there is an ID smaller than the previous one fill back the precedent values with the small ID to keep monotony.
  I am trying with the following:</p>
  
  <pre><code>df_test.ID.lt(df_test.ID.shift())
  </code></pre>
  
  <p>that gives me the change point in monotony:</p>
  
  <pre><code>0    False
  1    False
  2    False
  3     True
  4    False
  5     True
  Name: ID, dtype: bool
  </code></pre>
  
  <p>But I don't know how to move forward.
  I would appreciate any idea</p>
  
  <p>Thanks!</p>