需要在两天之类解决一个糖尿病预测问题,所以需要直接上手打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