2019-04-11
阅读量:
1070
python 对连续变量分箱
问题描述:
python 如何对连续变量进行分箱?
解决方法:
bins = [-1, 0, 6, 10, 17, 20, 23,100]
group_name = ['a', 'b', 'c', 'd','e','f','g']
box = pd.cut(train['hour'], bins, labels=group_name)






评论(0)


暂无数据
推荐帖子
0条评论
0条评论
0条评论