Hi, Please see the attached GIF imageI am trying to make a little tool to make random selections of features from feature classes by randomly selecting FIDs. What it does is:1.Creates a python list of feature FIDs2. Using the random.sample I draw a number of samples from my python list of FIDs, the number drawn is equivalent to what the user desires3. This is then converted to a sql statement allowing a selection to be made and stored in a new feature classI don't have trouble with my code, but the output does not seem to be that random, as the gif below showsI have tried random.shuffle and other variations but seem to get a similar output.Does anyone know anything about getting a better result, different method perhaps?Right now I am working on some test data and my population is about 300 with a sample of 30.Here is the part of my code that lists the FIDs and makes a selectionrows = arcpy.SearchCursor(InputToSample)
for row in rows:
fidVal = row.getValue(FieldName)
fidList.append(fidVal)
#make a random selection
rndList = random.sample(fidList, numSample)
ThanksDavid[ATTACH=CONFIG]11785[/ATTACH]