The task is to choose 1000 clients randomly. In the dataset, the number of rows and unique IDs are the same.
I randomly select and then try to select the dataset with choosen IDs:
from numpy.random import choice
ids = choice(df.id, 1000)
df[df.id.isin(ids)]
The result is quite different: size of df[df.id.isin(ids)] is equal to 917. Why aren't there 1000 rows?