When I invoke rename on a pivot table, I lose the axis labels:
In [5]: df = pd.DataFrame(dict(x=[0,0,1,0,1], y=[1,0,1,1,0], z=[0,0,1,0,1]))
In [6]: pt = pd.pivot_table(df, 'z', cols='x', rows='y')
In [7]: print pt
x 0 1
y
0 0 1
1 0 1
In [8]: labels = {0:'False', 1:'True'}
In [9]: print pt.rename(index=labels, columns=labels) # discards "x" and "y"
False True
False 0 1
True 0 1
Is there a way to do this without losing the axis labels?