wepe / O2O-Coupon-Usage-Forecast

1st Place Solution for O2O Coupon Usage Forecast
1.39k stars 844 forks source link

运行wepon/sesson one/extract_feature.py出现错误 #13

Open gutsttt opened 6 years ago

gutsttt commented 6 years ago

你好 我是新人 想学习一下你的代码 运行extract_feature.py出现问题 报错如下 Traceback (most recent call last): File "extract_feature.py", line 60, in feature3 = off_train[((off_train.date>='20160315')&(off_train.date<='20160630'))|((off_train.date=='null')&(off_train.date_received>='20160315')&(off_train.date_received<='20160630'))] File "C:\Users\u\AppData\Roaming\Python\Python36\site-packages\pandas\core\ops.py", line 879, in wrapper res = na_op(values, other) File "C:\Users\u\AppData\Roaming\Python\Python36\site-packages\pandas\core\ops.py", line 818, in na_op raise TypeError("invalid type comparison") TypeError: invalid type comparison 想请问该怎么处理

whiteyyc commented 6 years ago

你好,我也是新手,遇到这个问题,你解决了吗?

jijeng commented 6 years ago

on_train = pd.read_csv('data/ccf_online_stage1_train.csv',header=None, keep_default_na=False) 在使用pd 读取csv的时候 加上参数 keep_default_na = False

RobertMarton commented 6 years ago

Not work...My python version is 2.7

ChenKevin0123 commented 5 years ago

类型错误,改下字段类型

xxcheng0708 commented 3 years ago

off_train.date and off_train.date_received is float type