ValueError: Cannot set a frame with no defined index and a value that cannot be converted to a Series
- 不能设置没有定义的索引的frame对象和没有被转换为Series的值
- 错误代码:
df['PREDICT'] = df.apply(self.__predict, axis=1)
- 错误原因:df对象是空值
Empty DataFrame
ValueError: Cannot set a frame with no defined index and a value that cannot be converted to a Series
df['PREDICT'] = df.apply(self.__predict, axis=1)
Empty DataFrame