I'm trying to have my function go through the spread sheet inspect every other 3 columns and find the location (row number) of some values but it works partially. The code runs and returns some values but I get this error message between and it stops.
I'm using start=mm[0]
to grab the first value from the array and end=mm[-1]
to grab the last value.
def get_voltageStatus(r,t):
for i in range (1,len(data[0]),3):
m=np.where((data[1:,i]>=r) & (data[1:,i]<=t))
mm_raws = []
mm=m[0]
start=mm[0]
end=mm[-1]
print(data[0,i])
duration(start,end)
Error is:
start=mm[0] IndexError: index 0 is out of bounds for axis 0 with size 0