例如,如果我有这个数据框并绘制密度图:
df = pd.DataFrame(np.random.randn(6,6))
df.plot(kind='density', subplots=True, layout=(3,2), sharex=False, sharey=False,
fontsize=1)
pyplot.show()
它的产量
问题是,如果我尝试对箱线图做同样的事情,我会得到错误:
df.plot(kind='box', subplots=True, layout=(3,2), sharex=False, sharey=False,
fontsize=1)
pyplot.show()
我收到以下错误:
IndexError:索引 0 超出尺寸为 0 的轴 0 的范围
谢谢