【发布时间】:2019-03-06 15:58:32
【问题描述】:
我有一个 iris 数据集,我正在尝试为 iris 数据集的所有 4 列绘制分布图:
df.columns
['sepal length (cm)', 'sepal width (cm)', 'petal length (cm)',
'petal width (cm)']
我想绘制我尝试过的值的分布。
fig, (ax1,ax2,ax3,ax4)= plt.subplots(2,2)
sns.distplot(a = df.iloc[:,0])
我得到一个 ValueError:
ValueError Traceback (most recent call last)
<ipython-input-265-58940645d27a> in <module>()
----> 1 fig, (ax1,ax2,ax3,ax4)= plt.subplots(2,2)
2 sns.distplot(a = df.iloc[:,0])
ValueError: not enough values to unpack (expected 4, got 2)
【问题讨论】: