I have 2 paired 2-dim numpy arrays(say labels & scores)
labels = np.array([['a','b','c','d'],
['a1','b1','c1','d1']])
scores = np.array([[0.1, 0.2, 0.3,0.4],
[1,2,3,4]])
I want to get top k item from them sorted by scores second row
I think I can achieve so by sorting:
[scores[i][1], scores[i][0], labels[i][0], labels[i][1]]
But is there a more elegant way with numpy or pandas library?