【发布时间】:2019-12-16 11:24:41
【问题描述】:
我有以下 df。
PredictedFeature counts_x counts_y counts
0 100 1837 1224 850
1 200 215 60 2
2 3600 172 14 147
3 4600 143 124 138
4 162 30 16 20
现在,这里我要计算每个特征相对于counts_y的百分比
所以,公式会像,
1. (100/counts_y) * counts_x
2. (100/counts_y) * counts
希望有一个像
这样的最终数据帧predictedfeature counts_per counts_x
100 90 20
输出类型。
请帮我解决这个问题?
【问题讨论】:
-
你尝试了什么?