what am I doing wrong here? Am trying to keep count of of when the value in a column/field of a row/array is less than all the other ones in the row.
So am trying to iterate through each row to check if a particular column is less than the rest of the column.
below code always results to one. So am super confused. Everything I try leads to 1.
def is_dog_correct(row, x, y, z, r):
zero = 0
for i in xrange(len(row)):
if row[i-1][x] < row[i-1][y] and row[i-1][z] and row[i-1][r]:
return Zero + 1
else:
return 0
Also, could there be an easier way of doing this. Am using graphlab.SFrame