Any suggestion for random sample generation? I need to pick random 100 items from a large list every time I run it. I can do it by just comparing IDs of items and looping until count reaches a 100, but I am wondering if there are any built in features that can simplify this process.
Any suggestion for random sample generation? I need to pick random 100 items from
Share
You want
random.sample(population, k).