79654917

Date: 2025-06-05 17:10:37
Score: 1
Natty:
Report link

A minor correction to the previous answer:

data = data.withColumn("random_num", round(rand()*30+0.5).cast("int"))

This adds 0.5 so that we don't get 0 as one of the outcomes, and casts the result to an integer.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Bruce Krayenhoff