mercredi 25 mars 2020

constant shuffling of Pandas dataframe "alway get same result" [duplicate]

I want to shuffle one dataframe and get the same result dataframe every time

import random
x = [1, 2, 3, 4, 5, 6]
random.seed(4)
random.shuffle(x)
print x

I found this code but shuffle() method not accept pandas dataframe also I want to get the result in form of dataframe




Aucun commentaire:

Enregistrer un commentaire