“df.sample (frac = 1)” Kode Jawaban

sampel panda

>>> 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
Grieving Goose

df.sample (frac = 1)

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

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya