Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pyspark take random sample

#if replacement=true to allow duplicate entries in the sample & false otherwise.
#0.5 = sample size
#5 =seed
df.sample(true, 0.5, 5)
 
PREVIOUS NEXT
Tagged: #pyspark #random #sample
ADD COMMENT
Topic
Name
4+7 =