Answers for "pyspark take random sample"

1

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)
Posted by: Guest on September-03-2020

Python Answers by Framework

Browse Popular Code Answers by Language