【发布时间】:2016-12-23 21:37:55
【问题描述】:
我做了一些分析并找到了一个特定的模式,现在我正在尝试做一些预测。 我有一个数据集,可以预测童年时期发生给定事故次数的学生的评分。 我的预测矩阵看起来像这样:
A
injuries ratings
0 5
1 4.89
2 4.34
3 3.99
4 3.89
5 3.77
我的数据集如下所示:
B
siblings income injuries total_scoldings_from father
3 12000 4 09
4 34000 5 22
1 23400 3 12
3 24330 1 1
0 12000 1 12
现在我想创建一个列名predictions,它基本上匹配从A 到B 的条目并返回
siblings income injuries total_scoldings_from_father predictions
3 12000 4 09 3.89
4 34000 5 22 3.77
1 23400 3 12 3.99
3 24330 1 1 4.89
0 12000 1 12 4.89
请帮忙
还建议一个标题,因为我的标题缺少对将来参考的所有重要内容
【问题讨论】:
标签: python pandas dataframe mapping multiple-columns