I have the following pivot table
MQW MSND Grand Total
Amount($m) Amount($m) Amount($m)
Total Count Total Count Total Count
Margin Call Date
2016-12-06 16.99 4 8.50 6 25.50 10
2016-12-07 11.24 4 8.55 6 19.79 10
2016-12-08 4.21 5 8.28 6 12.49 11
2016-12-09 23.29 7 8.08 6 31.37 13
2016-12-12 0.29 1 8.73 6 9.02 7
Total 56.03 21 42.14 30 98.18 51
with the structure
MultiIndex(levels=[[u' Grand Total', u'MSND', u'MQW'], [u'Amount($m)'], [u'Count', u'Total']],labels=[[2, 2, 1, 1, 0, 0], [0, 0, 0, 0, 0, 0], [1, 0, 1, 0, 1, 0]])
and for the life of me I can't get the 'Count' and 'Total' columns to switch places using the .sortlevel method without also reversing the order of 'MQW','MSND', and 'Grand Total'. I've also tried setting 'sort_remaining' = False but it isn't working. This is what I'm trying to get.
MQW MSND Grand Total
Amount($m) Amount($m) Amount($m)
Count Total Count Total Count Total
Margin Call Date
2016-12-06 13.99 4 7.50 6 35.50 10
2016-12-07 1.24 4 16.55 6 9.79 10
2016-12-08 7.21 5 0.28 6 22.49 11
2016-12-09 33.29 7 9.08 6 21.37 13
2016-12-12 0.29 1 8.73 6 9.02 7
Total 56.03 21 42.14 30 98.18 51
Any help would be much appreciated!