Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Randomly splits this DataFrame with the provided weights

# Randomly splits this DataFrame with the provided weights

splits = df4.randomSplit([1.0, 2.0], 24)
splits[0].count()
# 1

splits[1].count()
# 3
Source by spark.apache.org #
 
PREVIOUS NEXT
Tagged: #Randomly #splits #DataFrame #weights
ADD COMMENT
Topic
Name
8+4 =