Question: Explain the purpose of the 'coalesce' method in PySpark.Answer: The 'coalesce' method is used to reduce the number of partitions in a PySpark DataFrame. It helps in optimizing the performance when the number of partitions is unnecessarily large.Example:
|
Is it helpful?
Yes
No
Most helpful rated by users: