Comments (8)
你把line99换成这个试试
t3['this_month_user_receive_same_coupon_lastone'] = t3.max_date_received.astype('int') - t3.date_received.astype('int')
from o2o-coupon-usage-forecast.
@wepe
改了后得到了以下的错误
Traceback (most recent call last):
File "extract_feature.py", line 99, in
t3['this_month_user_receive_same_coupon_lastone'] = t3.max_date_received.astype('int') - t3.date_received.astype('int')
File "/usr/lib64/python2.7/site-packages/pandas/core/generic.py", line 3054, in astype
raise_on_error=raise_on_error, **kwargs)
File "/usr/lib64/python2.7/site-packages/pandas/core/internals.py", line 3189, in astype
return self.apply('astype', dtype=dtype, **kwargs)
File "/usr/lib64/python2.7/site-packages/pandas/core/internals.py", line 3056, in apply
applied = getattr(b, f)(**kwargs)
File "/usr/lib64/python2.7/site-packages/pandas/core/internals.py", line 461, in astype
values=values, **kwargs)
File "/usr/lib64/python2.7/site-packages/pandas/core/internals.py", line 504, in _astype
values = _astype_nansafe(values.ravel(), dtype, copy=True)
File "/usr/lib64/python2.7/site-packages/pandas/types/cast.py", line 531, in _astype_nansafe
raise ValueError('Cannot convert NA to integer')
ValueError: Cannot convert NA to integer
from o2o-coupon-usage-forecast.
ValueError: Cannot convert NA to integer
你应该是date_received这一列数据有问题,我的可以跑通,你确定一下自己下载的数据没问题? date_received字段的数据是 20160701 这种格式的。
from o2o-coupon-usage-forecast.
确定数据没有问题,
这个是执行line 99之前的t3的内容,我想会不会是我的pandas版本的问题,请问你的pandas的版本是多少?
from o2o-coupon-usage-forecast.
我的pandas 版本:0.18.1
from o2o-coupon-usage-forecast.
确实是我的原始数据有些问题,谢谢
from o2o-coupon-usage-forecast.
@BoyuanJiang 你用的数据不是作者提供的数据吗,我也出现你这个错误了 请问怎么解决的
from o2o-coupon-usage-forecast.
@BoyuanJiang 请问数据有什么问题,我也在这个点上出现了问题,不确定数据在哪里有问题
from o2o-coupon-usage-forecast.
Related Issues (20)
- 运行season one中的xgb.py出现问题 HOT 3
- 小白一枚请教简单问题 忘回答
- /wepon/season one 中extract_feature.py问题 HOT 11
- 运行wepon/sesson one/extract_feature.py出现错误 HOT 5
- 请问融合时gbdt和xgb的权值是如何最终确定下来的呢?
- 运行wepon/sesson one/extract_feature.py出现错误 HOT 1
- coupon相关的特征是context特征,为何只利用测试集构造?
- 你好,我是一个新人,运行wepon/sesson one/extract_feature.py出现错误
- 请问关于错误ValueError: invalid literal for int() with base 10: 'nan'你说设置参数,该怎么设置呀,我也是这个问题
- 请问代码为什么下载不了呢,我想学习一下
- 关于season1的训练集
- xgboost ValueError:特征名不匹配
- Spell check
- 在运行get_day_gap_before时出现了问题 HOT 1
- 滑窗法中节假日提取特征的疑问 HOT 7
- season one:特征提取代码有问题 HOT 6
- 提供的百度网盘的数据集无法解压 HOT 2
- 我把你的代码跑了一遍,出现报错,我目前是菜鸟,所以想出你这里学一下!有什么好的书可以推荐的吗
- wepon/season one下的coupon feature提取问题 HOT 1
- 请教最终训练集中的缺失值怎么处理?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from o2o-coupon-usage-forecast.