df.sample(frac=1)

45

>>> df.sample(frac=0.5, replace=True, random_state=1)
      num_legs  num_wings  num_specimen_seen
dog          4          0                  2
fish         0          0                  8
df.sample(frac=1, replace=True, random_state=1)
      num_legs  num_wings  num_specimen_seen
dog          4          0                  2
fish         0          0                  8
df.sample(frac=0.5, replace=True, random_state=1)

Comments

Submit
0 Comments