def reindex(report):
    """Reindex report so that 'TOTAL' is the last row"""
    index = list(report.index)
    i = index.index('TOTAL')
    return report.reindex(index[:i] + index[i+1:] + ['TOTAL'])