.count() action

The count() action returns the number of elements in the RDD. See the following code:

(
flights
.zipWithIndex()
.filter(lambda (row, idx): idx > 0)
.map(lambda (row, idx): row)
.count()
)

This will produce the following result:

# Output
1391578
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset