title: Sorting a multindex data frame
body: <p>I am trying to work on a requirement where I want to sort values in a multiindex dataframe, here is my below code-</p>
  <pre><code>import pandas as pd
  import numpy as np
  s={'Fruits':['Apple','Orange', 'Banana', 'Mango'],'month':[2014,2015,2016,2017],'Weight':[2,4,1,7],'Quant':[5,2,3,9]}
  p=pd.DataFrame(data=s)
  df=pd.pivot_table(p,index='Fruits',columns='month',values=['Weight','Quant'],aggfunc=np.sum)
  df=df.fillna(0)
  </code></pre>
  <p>The dataframe looks like this-</p>
  <p><a href="https://i.stack.imgur.com/0ofWP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0ofWP.png" alt="enter image description here" /></a></p>
  <p>I am trying to sort values based on Quant, so every column ie 2014-2017,present in Quant, its values needs to be arranged in an ascending order.</p>
  <p>I am trying the below code, but getting an error, how would I rectify this-</p>
  <pre><code>df.sort_values(by='Quant')
  
  ValueError: The column label 'Quant' is not unique.
  For a multi-index, the label must be a tuple with elements corresponding to each level.
  </code></pre>