RDD.
isEmpty
Returns true if and only if the RDD contains no elements at all.
New in version 1.3.0.
whether the RDD is empty
RDD
See also
RDD.first()
pyspark.sql.DataFrame.isEmpty()
Notes
An RDD may be empty even when it has at least 1 partition.
Examples
>>> sc.parallelize([]).isEmpty() True >>> sc.parallelize([1]).isEmpty() False