I have this code:
dd = input("What is your desired degree for slices? ")
listnum = int(360 / dd)
a = OrderedDict()
for x in range(0,listnum):
for j in range(len(posvcs)):
begin = 0
end = dd
if (posvcs[j,2] >= begin) & (posvcs[j,2] < end):
a["dataset{0}".format(x)] = posvcs[begin:end,2]
begin = begin + end
end = begin + dd
It's supposed to be looking through "posvcs" column 2, each row, for values between two different values in degrees. For example, if i want to have my pie cut into 8 pieces in 45 degree increments and my data set (posvcs) has points with degree values between 0 & 360, i want it to first only look at desired degree = 0 to 45. Then, taking those corresponding rows & columns, putting the data into "dataset0". Then, it'll put data from 45 to 90 degrees into "dataset1".
What it is doing is taking "dd" number of rows (so in my example, it's taking the first 45 rows) and only backing up that data. And then instead of "begin" and "end" values changing to move onto the next angle increment specified, it's staying at 45.
Any help is greatly appreciated!
EDIT: Typo with indentations. It is now written as it is in my program.