您的位置:首页 > 编程语言 > Python开发

python-kaggle比赛资料收集

2016-12-05 09:10 211 查看
需要在两天之类解决一个糖尿病预测问题,所以需要直接上手打kaggle比赛的一些经验!!!

用python参加Kaggle的些许经验总结

Getting Started With Python

Getting Started With Python II

Getting Started With Random Forests

十分钟搞定pandas

pandas 数据规整

pandas中object转换类型

a = [['a', '1.2', '4.2'], ['b', '70', '0.03'], ['x', '5', '0']]
df = pd.DataFrame(a, columns=['one', 'two', 'three'])
df
Out[16]:
one  two three
0   a  1.2   4.2
1   b   70  0.03
2   x    5     0

df.dtypes
Out[17]:
one      object
two      object
three    object

df[['two', 'three']] = df[['two', 'three']].astype(float)

df.dtypes
Out[19]:
one       object
two      float64
three    float64
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: