我做了一些分析,发现了一个特殊的模式,现在我正在尝试做一些预测。 我有一个数据集,可以预测学生在童年发生过一定数量事故的评分。 我的预测矩阵是这样的:
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
请帮忙
也建议一个标题,因为我缺乏一切重要的未来参考
如果映射的所有值都在数据帧} :
A
中,则可以使用^{使用^{} 的另一种解决方案:
相关问题 更多 >
编程相关推荐