title: Sort Pandas Pivot Table by the margin ('All') values column
body: <p>I'm trying to do a descending sort on the last column/margins/aggrfunc by the sum of the rows in a pandas pivot table.  I know I'm missing something simple here, but I can't figure it out. </p>
  
  <p>dataframe/pivot table:</p>
  
  <pre><code>WIDGETS         
  DATE    2/1/16  2/2/16  2/3/16  All
  NAME                
  PERSON1 43      5               48
  PERSON2         4       7       11
  PERSON3         56      143     199
  </code></pre>
  
  <p>What I need it to do is also sort by aggfunc/margins:</p>
  
  <pre><code>WIDGETS         
  DATE    2/1/16  2/2/16  2/3/16  All
  NAME                
  PERSON3         56      143     199
  PERSON1 43      5               48
  PERSON2         4       7       11
  
  pt = pd.pivot_table(df,values=['WIDGETS'],index=['NAME'],columns=['DATE'],aggfunc=len,fill_value='',margins=True,margins_name='WIDGETS')
  pt.sort_values(by='WIDGETS',ascending=False,inplace=True)
  </code></pre>
  
  <p><strong>Error:</strong>
  ValueError: Cannot sort by column WIDGETS in a multi-index  you need to explicity provide all the levels</p>
  
  <p>Suggestions?</p>