Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pandas sample

>>> df['num_legs'].sample(n=3, random_state=1)
fish      0
spider    8
falcon    2
Name: num_legs, dtype: int64
Source by pandas.pydata.org #
 
PREVIOUS NEXT
Tagged: #pandas #sample
ADD COMMENT
Topic
Name
4+7 =