Anyone can help me with pandas?
I have a set of data n= 50, how can I select random sample from the data if i required to randomly selected it based on different size.
For example:
- a = From 50, i need to select 25
- b = From 50, i need to select 5
- c = Fom 50, i need to select 10
- d = From 50, i need to select 2
- e = From 50, i need to select 8
I used
a = df.sample(25)
how can i make sure, if i create b=df.sample(5) it is not a same sample with a,c,d,e?
Aucun commentaire:
Enregistrer un commentaire