一、现象
代码运行到
...
model.fit(…)报错
...
运行报如下错误
ValueError:DataFrame.dtypes for data must be int, float or bool
Did not expect the data types in the following fields:money
二、解决方案
即可解决报错问题
df[“money”] = df[“money”].astype(“int”)
或者
df[“money”] = df[“money”].astype(“float”)