pandas如何对数组排序

2024-05-09 09:09:54
pandas如何对数组排序求高手给解答
写回答

最佳答案

# 以数组 a 的从小到大的顺序为基准,对数组b进行重排序,并返回排序结果的索引数

import numpy as np

b = np.array([0,1,2,3,4,5,6])

index = np.lexsort((b, a))

2024-05-09 09:09:54
赞 1889踩 0

全部回答(1)