-
Notifications
You must be signed in to change notification settings - Fork 844
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
运行wepon/sesson one/extract_feature.py错误 #2
Comments
你把line99换成这个试试 t3['this_month_user_receive_same_coupon_lastone'] = t3.max_date_received.astype('int') - t3.date_received.astype('int') |
@wepe |
你应该是date_received这一列数据有问题,我的可以跑通,你确定一下自己下载的数据没问题? date_received字段的数据是 20160701 这种格式的。 |
我的pandas 版本:0.18.1 |
确实是我的原始数据有些问题,谢谢 |
@BoyuanJiang 你用的数据不是作者提供的数据吗,我也出现你这个错误了 请问怎么解决的 |
@BoyuanJiang 请问数据有什么问题,我也在这个点上出现了问题,不确定数据在哪里有问题 |
Traceback (most recent call last):
File "extract_feature.py", line 99, in
t3['this_month_user_receive_same_coupon_lastone'] = t3.max_date_received - t3.date_received
File "/usr/lib64/python2.7/site-packages/pandas/core/ops.py", line 715, in wrapper
result = wrap_results(safe_na_op(lvalues, rvalues))
File "/usr/lib64/python2.7/site-packages/pandas/core/ops.py", line 676, in safe_na_op
return na_op(lvalues, rvalues)
File "/usr/lib64/python2.7/site-packages/pandas/core/ops.py", line 658, in na_op
result[mask] = op(x[mask], _values_from_object(y[mask]))
TypeError: unsupported operand type(s) for -: 'float' and 'str'
The text was updated successfully, but these errors were encountered: