Share via


DataFrame.Coalesce(Int32) Method

Definition

Returns a new DataFrame that has exactly numPartitions partitions, when the fewer partitions are requested. If a larger number of partitions is requested, it will stay at the current number of partitions.

public Microsoft.Spark.Sql.DataFrame Coalesce (int numPartitions);
member this.Coalesce : int -> Microsoft.Spark.Sql.DataFrame
Public Function Coalesce (numPartitions As Integer) As DataFrame

Parameters

numPartitions
Int32

Number of partitions

Returns

DataFrame object

Applies to