New to programming in general. This is my code
for b in range(LengthSpread):
Strip = ReadSpread[b].rstrip('\n')
SplitData = ReadSpread[b].split(",")
PlotID = SplitData[1]
PlotIDnum = float(PlotID)
if PlotIDnum == 1:
List = SplitData
print List
OpenBlank.writelines('%s\n\n\n\n\n' % List)
Ultimately I want to find data based on changing each plotIDnum in the overall dataset. How would I change the number in the conditional if statement, without physically changing the number. Possibly using a for loop, or a while loop. Can't wrap my mind around it.
This is an example of the inputdata
09Tree #PlotID PlotID
1 1 Tree
2 1 Tree
3 2 Tree
4 2 Tree
6 4 Tree
7 5 Tree
8 5 Tree
9 5 Tree
I want my output to be organized by plotID#, and place each output in either a new spreadsheet or have each unique dataset in a new tab
Thanks for any help