pyspark.RDD.collect¶

RDD.collect() → List[T][source]

Return a list that contains all of the elements in this RDD.

Notes

This method should only be used if the resulting array is expected to be small, as all the data is loaded into the driver’s memory.