I am currently picking 10% of the sample from pandas groupby and I am performing the same operation for 10 times.
for i in range(10): sampled = df.groupby(by=['month','year','id_n']).sample(frac=0.10, replace=True)
But each time, it is running for a very long time. Is there any alternative to make it real quick?
Thank you in advance