Series.
swapaxes
Interchange axes and swap values axes appropriately.
pandas.Series.sum
pandas.Series.swaplevel