这是用于显示上图的代码块。当我使用rubix stack-multi-series-bar-chart时,x轴正在重复。如何避免这种情况?This is the duplication on x-axis of chart
In [120]:
df['composite'] = df['XY']+df['UV']
df
Out[120]:
XY UV BC Val composite
0 y u c 11 yu
1 y u b 22 yu
2 y v c 33 yv
3 y v b 44 yv
4 x u c 111 xu
5 x u b 222 xu
6 x v c 333 xv
7 x v b 444 xv
In [121]:
df.pivot(index='composite', columns='BC', values='Val')
Out[121]:
BC b c
composite
xu 222 111
xv 444 333
yu 22 11
yv 44 33