Have a look at the attached file.
I've added formulas in each row to count the no of values in each column that are greater than the value in the same column in the current row.
I've also added formula to check if all the values in the row are greater than all the values in the rest of the column and to check if any of the values in the row are greater than all the values in the rest of the column.
As you can see no rows satisfy the former condition but 2 satisfy the latter.
Is this any where near what you are trying to do or am I completely missing the whole thing.
P.S. If you were doing this in Python wouldn't you be looping through the rows and then for each row looping through the values in the columns of that row to compare them to the rest of the values in the column.
Kiind of like this.
import numpy as np
from random import randint
# create list of lists with 20 rows, 3 columns and populate with random integers between 1 and 100 inclusive
scores = [[randint(1, 100) for col in range(3)] for row in range(20)]
scores = np.array(scores)
print(scores.shape)
for row in range(scores.shape[0]):
for col in range(scores.shape[1]):
print(all(scores[row, col]>scores[:,col]))
print(any(scores[row, col]>scores[:,col]))
Bookmarks