【发布时间】:2018-07-11 06:46:02
【问题描述】:
我有一个这样的熊猫系列:
measure
0 0.3
6 0.6
9 0.2
11 0.3
14 0.0
17 0.1
23 0.9
还有一个像这样的 numpy 数组:
array([[ 0, 0, 9, 11],
[ 6, 14, 6, 17]])
如何从 numpy 数组中的值到系列中的索引进行查找以获得此:
array([[ 0.3, 0.3, 0.2, 0.3],
[ 0.6, 0.0, 0.6, 0.1]])
【问题讨论】:
标签: python python-3.x pandas numpy dictionary