mardi 20 août 2019

Is it appropriate to iterate over ints for random seed?

I want to make three random samples of a pandas dataframe, while seeding random so that I can retrieve the data again at a later time. Is it appropriate to iterate over a range of integers to do this, or could there be any side-effects from doing this? Does it take away from any of the pseudo-randomness? Here's the code I'm using:

for x in range(1,4): # int for the random seed
    randsamp = df.sample(frac=0.1, random_state=x)
    randsamp.to_csv("./sample"+str(x)+".csv",sep=';')




Aucun commentaire:

Enregistrer un commentaire