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
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