Databricks Certified Associate Developer For Apache Spark 30 · Free Practice Question Easy
Question 13
How make sure that dataframe df has 8 partitions given that it has 4 partitions ?
-
A
df.repartition(8) -
B
df.coalesce(8) -
C
df.partition(8) -
D
df.setPartitition(8)
Reveal correct answer
Correct answer: A
Explanation
correct syntax is;
df.repartition(8)
and you cannot increase the number of partitions with
df.coalesce(8)
Discussion
Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.
You must be logged in to post a comment.
