前言 在使用Map对str批量数据转换只收,直接使用np.argmax得到的索引值是有问题的。问题可简化为如下代码。先记录,等空了探究。 np.argmax([0, 1, 2, 3, 4]) 结果:4 a = "1 2 3 4 5" np.argmax(map(float, a)) 结果:0