pyspark.SparkContext.broadcast

SparkContext.broadcast(value: T) → pyspark.broadcast.Broadcast[T]

Broadcast a read-only variable to the cluster, returning a Broadcast object for reading it in distributed functions. The variable will be sent to each cluster only once.