title: How to sort pandas data frame using values from several columns?
body: <p>I have the following data frame:</p>
  
  <pre><code>df = pandas.DataFrame([{'c1':3,'c2':10},{'c1':2, 'c2':30},{'c1':1,'c2':20},{'c1':2,'c2':15},{'c1':2,'c2':100}])
  </code></pre>
  
  <p>Or, in human readable form:</p>
  
  <pre><code>   c1   c2
  0   3   10
  1   2   30
  2   1   20
  3   2   15
  4   2  100
  </code></pre>
  
  <p>The following sorting-command works as expected:</p>
  
  <pre><code>df.sort(['c1','c2'], ascending=False)
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>   c1   c2
  0   3   10
  4   2  100
  1   2   30
  3   2   15
  2   1   20
  </code></pre>
  
  <p>But the following command:</p>
  
  <pre><code>df.sort(['c1','c2'], ascending=[False,True])
  </code></pre>
  
  <p>results in</p>
  
  <pre><code>   c1   c2
  2   1   20
  3   2   15
  1   2   30
  4   2  100
  0   3   10
  </code></pre>
  
  <p>and this is not what I expect. I expect to have the values in the first column ordered from largest to smallest, and if there are identical values in the first column, order by the ascending values from the second column.</p>
  
  <p>Does anybody know why it does not work as expected?</p>
  
  <p><strong>ADDED</strong></p>
  
  <p>This is copy-paste:</p>
  
  <pre><code>&gt;&gt;&gt; df.sort(['c1','c2'], ascending=[False,True])
     c1   c2
  2   1   20
  3   2   15
  1   2   30
  4   2  100
  0   3   10
  </code></pre>