I currently have a condition as:
if np.any(x <= 0.5):
print ("right")
else:
print ("wrong")
But the problem is I don't want to use np.any()
or np.all()
.
The value of x
is in a constantly changing csv file and I want the condition to only apply to the first and last rows of the file of the third column.
What would be the best and most efficient way to implement this?