mercredi 29 juin 2016

Random Sample of a subset of a dataframe in Pandas

Say i have a dataframe with 100,000 entries and want to split it into 100 sections of 1000 entries.

How do i take a random sample of say size 50 of just one of the 100 sections. the data set is already ordered such that the first 1000 results are the first section the next section the next and so on.

many thanks




Aucun commentaire:

Enregistrer un commentaire