I have a multidimensional array where I want to return the 1st index, of the highest value of the 2nd index if they have the same zeroth indexes. For example:
array = [[ 0, 2, 54]
[ 0, 3, 83]
[ 0, 4, 92]
[ 1, 5, 52]
[ 1, 6, 28]
[ 2, 7, 20]
[ 2, 8, 22]
I want it to return: 4,5,8 (Basically, the zeroth indexes are the categories the row belongs to, the 1st index is what I want it to return, based on the highest value in the 2nd indexes of the same zeroth category)
I'm not sure how to even start so apologies for not including what I have tried.