archeryguru2000
Programmer
Hello, I've been stumped for several weeks on this particlar program. At work here, we have 30 machines that we record scrap data on. I take this data and create spreadsheets (boring) that can be used for analysis. Anyway, I was wondering how I could change this "for" statement to a much more condensed amount of code.
for i in range(30):
while hold[n,3] == 1:
hold_01.append( hold[n,8] )
hDate_01.append( hold[n,0] )
n = n + 1
while hold[n,3] == 2:
hold_02.append( hold[n,8] )
hDate_02.append( hold[n,0] )
n = n + 1
while hold[n,3] == 3:
... and so on, for a total of 30 machines.
Is there anyway to alter the line(s) with the .append from a 1-D vector to a 2-D array, so I can set me while loop == i, and add the data from hold[] to the next row, and so on. Any help would be greatly appreciated.
Thanks,
~~archeryguru2000~~
for i in range(30):
while hold[n,3] == 1:
hold_01.append( hold[n,8] )
hDate_01.append( hold[n,0] )
n = n + 1
while hold[n,3] == 2:
hold_02.append( hold[n,8] )
hDate_02.append( hold[n,0] )
n = n + 1
while hold[n,3] == 3:
... and so on, for a total of 30 machines.
Is there anyway to alter the line(s) with the .append from a 1-D vector to a 2-D array, so I can set me while loop == i, and add the data from hold[] to the next row, and so on. Any help would be greatly appreciated.
Thanks,
~~archeryguru2000~~