问题描述
我正在尝试在 seaborn 中创建特征对图。但我不断收到错误:
"The truth value of a DataFrame is ambiguous. Use a.empty,a.bool(),a.item(),a.any() or a.all()."
这是完整的代码:
sns.pairplot(X_train,hue= y_train,diag_kind='hist'); # we want histograms along the diagonals
X_train dataframe consists of 4 columns: mass,height,width,color_score
y_train dataframe consists only of column: fruit_label (values: 1,2,3,4)
当我尝试使用 "hue= y_train.values"
时,显示的错误更改为“ Index data must be 1-dimensional"
有人可以解释一下发生了什么吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)