compute the totals in the python code
replace the multicolumn index by multiple indexes
fix tests