pandas如何对数组排序

更新时间:02-09 教程 由 妄臣 分享

pandas如何对数组排序?

# 以数组 a 的从小到大的顺序为基准,对数组b进行重排序,并返回排序结果的索引数 import numpy as np a = np.array([0,1,3,2,6,4,5]) b = np.array([0,1,2,3,4,5,6]) index = np.lexsort((b, a))

声明:关于《pandas如何对数组排序》以上内容仅供参考,若您的权利被侵害,请联系13825271@qq.com
本文网址:http://www.25820.com/tutorial/14_2187213.html