-
Notifications
You must be signed in to change notification settings - Fork 845
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/season one 中extract_feature.py问题 #12
Comments
不好意思这个是环境变量问题你File "/Library/Python/2.7/site-packages/pandas/core/ops.py", line 818, in na_op
raise TypeError("invalid type comparison") 修改成\\看看
在2018年3月8日 10:49,fannn1217<[email protected]><mailto:[email protected]> 写道:
请问在运行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 "/Library/Python/2.7/site-packages/pandas/core/ops.py", line 879, in wrapper
res = na_op(values, other)
File "/Library/Python/2.7/site-packages/pandas/core/ops.py", line 818, in na_op
raise TypeError("invalid type comparison")
TypeError: invalid type comparison
怎么解决呢
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<#12>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AMAaSHvNq5g_zki3cCH5mBrqd54wLFt5ks5tcJwUgaJpZM4SiDaZ>.
|
你好请问下,这个怎么解决的?解决了,在读取train文件时设置keep_default_na = False..我的是py3.可能就是nan的问题! |
@WorldBestGaming 您好,请问你的nan问题是如何解决,我遇到了这个问题“ValueError: invalid literal for int() with base 10: 'nan'”。 |
@iimmortall 你pandas读取文件时,有个参数是keep_default_na你设置一下False就ok了。 |
Cause there so many pd.read_csv..so when trackback the code ,which operaion should I change 'keep_defau.lt_na=False‘.I've changed some but the result is negative.. |
@RobertMarton i can`t understand you say that the result is negative.= =! emmm |
Emmm, I added 'keep_default_na=False' in code |
I changed some code then ,when running xgb.py occurs error below: |
@RobertMarton How duo you solve this |
@RobertMarton emmmm. My solution is based on python3.your enviorment is py2.I guess the data format is a problem, you can try to change utf-8. = =! |
nan的问题在比较前先把那列fillna('null') |
请问在运行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 "/Library/Python/2.7/site-packages/pandas/core/ops.py", line 879, in wrapper
res = na_op(values, other)
File "/Library/Python/2.7/site-packages/pandas/core/ops.py", line 818, in na_op
raise TypeError("invalid type comparison")
TypeError: invalid type comparison
怎么解决呢
The text was updated successfully, but these errors were encountered: