我正在尝试编写一个脚本,根据这些品质的列表计算一组品质的分数。我的数据框如下所示:
qual1 qual2 ... score
8 intellectual intellectual ... 8
7 funny charismatic ... 7
6 witty ambitious ... 6
5 outgoing honest ... 5
4 adventurous active ... 4
3 NaN adventurous ... 3
2 NaN outgoing ... 2
我想得到这样的东西:
quals score
intellectual 8
funny 7
witty 6
outgoing 5
adventurous 4
intellectual 8
charismatic 7
ambitious 6
honest 5
active 4
adventurous 3
outgoing 2
我不知道该怎么做,所以很遗憾没有代码示例:(