Choosing sample from large dataset?
Let's say you have a dataframe with 10,000 rows, and  you have only 1,000 unique ones.

You can do:

df_unique = df.drop_duplicates()
df_sample = df.sample(n)

df_final = pd.concat([df_unique, df_sample], axis=0)


In the above code, n is the amount of sample you want.
In this way you can assure that every unique row is in your dataset and you have more samples on it.