I have a pandas dataframe and I want to sample the values by weights and I know there is df.sample function.
But the problem that I need is to get a sample that has N unique elements in one of the dataframe columns
Can anyone do something similar?
Aucun commentaire:
Enregistrer un commentaire