我阅读了有关此主题的多个可用问题,但仍然不明白我的问题。
我正在尝试建立回归,使用PyCaret
:
from pycaret.regression import *
fooPy = setup(data = foo, target = 'pts', session_id = 123)
我收到错误:
TypeError: unsupported operand type(s) for +: 'int' and 'str'
不确定问题出在哪里,因为我在结构中看不到任何字符串:
pts_500 float64
pts_500_p float64
OBP_avg float64
SLG_avg float64
SB_avg float64
RBI_avg float64
R_avg float64
home int64
first_time_pitcher int32
park_ratio_OBP float64
park_ratio_SLG float64
order float64
SO_avg_p float64
pts_500_parkadj_p float64
pts_500_parkadj float64
SLG_avg_parkadj float64
OPS_avg_parkadj float64
SLG_avg_parkadj_p float64
OPS_avg_parkadj_p float64
pts_BxP float64
SLG_BxP float64
OPS_BxP float64
whip_SO_BxP float64
whip_SO_B float64
whip_SO_B_parkadj float64
order float64
ops x pts_500 order15 float64
ops x pts_500 parkadj float64
ops23 x pts_500 float64
ops x pts_500 orderadj float64
whip_p float64
whip_SO_p float64
whip_SO_parkadj_p float64
whip_parkadj_p float64
pts float64
dtype: object
home
并且first_time_pitcher
是整数。
完整错误如下所示:
感谢任何提示!