pyspark.SparkContext.emptyRDD#

SparkContext.emptyRDD()[source]#

Create an RDD that has no partitions or elements.

New in version 1.5.0.

Returns
RDD

An empty RDD

Examples

>>> sc.emptyRDD()
EmptyRDD...
>>> sc.emptyRDD().count()
0