Skip to content
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出现错误 #13

Open
gutsttt opened this issue May 13, 2018 · 5 comments
Open

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

gutsttt opened this issue May 13, 2018 · 5 comments

Comments

@gutsttt
Copy link

gutsttt commented May 13, 2018

你好 我是新人 想学习一下你的代码 运行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
Copy link

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

@jijeng
Copy link

jijeng commented May 31, 2018

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

@RobertMarton
Copy link

Not work...My python version is 2.7

@ChenKevin0123
Copy link

类型错误,改下字段类型

@xxcheng0708
Copy link

off_train.date and off_train.date_received is float type

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants