DataFrame' 对象没有属性 'reshape 并且不能连接类型错误的对象

问题描述

我有以下代码

X,y = X_pool.iloc[query_index].reshape(1,-1),y_pool.iloc[query_index].reshape(1,)
learner.teach(X,y)

当我运行时,它返回此错误:“DataFrame”对象没有属性“reshape”。我试图将第一行修改为此 X,y = X_pool.iloc[query_index].values.reshape(1,y_pool.iloc[query_index].values.reshape(1,)解决这个问题,但我得到这个错误:“无法连接类型为 '' 的对象;只有 Series 和 DataFrame objs 是有效的”在第二行。我尝试在 colab 中安装 !pip install -U pandas-profiling 以解决一个错误但不起作用。有人能帮我解决这个问题吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)