df_sample = df.sample(n=1000) df_sample.shape(1000,10) df_sample2 = df.sample(frac=0.1) df_sample2.shape(1000,10)