Exemple de poids d'échantillon de pandas
# Assuming you have a column with few category and you want to see more/few
# of some cateogry in your sample, then you can try the following code
# remember the weights must adds up to 1
|____________________________________
↓ ↓ ↓
w = df['label'].apply( lambda x: {-1:0.5, 0:0.4, 1:0.1}[x] )
df.sample(n=1, weights=w, axis=0)
Darkstar