I have a function which calculates sum of money spent on each checkout on a counter, After calculation, i want to find the best two checkout counter, I am able to find the index
Don't make it complicated, it is simple:
INDX = (-ARRAY).argsort()[:N]
where N is the number of elements you are searching for, e.g. N=2 (two largest numbers) ARRAY is your numpy array which you are searching in, e.g. ARRAY=np.array[10.1,9,10,5,1,3] and, INDX is a list of the indices of the elements within the ARRAY. Obviously the length of INDX is equal to N.