Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pandas sample frac

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
Source by pandas.pydata.org #
 
PREVIOUS NEXT
Tagged: #pandas #sample #frac
ADD COMMENT
Topic
Name
2+7 =