Pick randomly index of samples in dataset
<p>I ve got in python a dataset of 31 samples. I want to split it the datasett randomly 30 times in 30 training samples and 1 samples test samples, how can I do so?</p>

<p>Right now I just split using the first 30 for training and the last one for testing like this:</p>

<blockquote>
  <p>training_this_round = training[0:30] </p>
  
  <p>testing_this_round =training[30:31]</p>
</blockquote>

<p>How can I pick the rows of the matrix randomly? Training is the variable which contain all my initial dataset.</p>