jeudi 10 janvier 2019

How to get randomly 20 elements from np.array and save it to DataFrame?

I have DataFrame from 1 to 80 numbers how can i get randomly 20 elements and save result to another DataFrame? I cant save every list like a row. Its saving elements like a columns. In the future i want to try predict every radom elements with sklearn

   a = np.arange(1,81).reshape(8,10)
   pd.DataFrame(a)




Aucun commentaire:

Enregistrer un commentaire