chevron_left PySpark RDD
PySpark RDD | getNumPartitions method
schedule Jul 1, 2022Last updated
getNumPartitions() method returns the number of partitions of a RDD.
Getting the number of partitions of RDD
To get the number of partitions of a RDD:
# Create a RDD of 3 partitionsrdd = sc.parallelize(["A","B","C","D","E","F"], numSlices=3)rdd.getNumPartitions()3
Join our newsletter for updates on new DS/ML comprehensive guides (spam-free)
Published by Isshin Inada
Edited by 0 others
Did you find this page useful?
Ask a question or leave a feedback...
Enjoy our search
Hit / to insta-search docs and recipes!