I have a part of a code that counts what is in the x,y and z columns of a data set for a given range. What I want it to do is count only those values that are in x, y and z. Basically what I am trying to do is have the code count the number of values in a 3D box. How can I modify the following to do so? Thanks in advance
Sx = ((min <= X) & (X <= max)).sum() #count what is in x range
Sy = ((min <= Y) & (Y <= max)).sum() #count what is in y range
Sz = ((min <= Z) & (Z <= max)).sum() #count what is in z range
Still not sure if this really is what you want, but anyway: