Share via


DataFrame.Repartition Method

Definition

Overloads

Repartition(Int32, Column[])

Returns a new DataFrame partitioned by the given partitioning expressions into numPartitions. The resulting DataFrame is hash partitioned.

Repartition(Int32)

Returns a new DataFrame that has exactly numPartitions partitions.

Repartition(Column[])

Returns a new DataFrame partitioned by the given partitioning expressions, using spark.sql.shuffle.partitions as number of partitions.

Repartition(Int32, Column[])

Returns a new DataFrame partitioned by the given partitioning expressions into numPartitions. The resulting DataFrame is hash partitioned.

public Microsoft.Spark.Sql.DataFrame Repartition (int numPartitions, params Microsoft.Spark.Sql.Column[] partitionExprs);
member this.Repartition : int * Microsoft.Spark.Sql.Column[] -> Microsoft.Spark.Sql.DataFrame
Public Function Repartition (numPartitions As Integer, ParamArray partitionExprs As Column()) As DataFrame

Parameters

numPartitions
Int32

Number of partitions

partitionExprs
Column[]

Partitioning expressions

Returns

DataFrame object

Applies to

Repartition(Int32)

Returns a new DataFrame that has exactly numPartitions partitions.

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

Parameters

numPartitions
Int32

Number of partitions

Returns

DataFrame object

Applies to

Repartition(Column[])

Returns a new DataFrame partitioned by the given partitioning expressions, using spark.sql.shuffle.partitions as number of partitions.

public Microsoft.Spark.Sql.DataFrame Repartition (params Microsoft.Spark.Sql.Column[] partitionExprs);
member this.Repartition : Microsoft.Spark.Sql.Column[] -> Microsoft.Spark.Sql.DataFrame
Public Function Repartition (ParamArray partitionExprs As Column()) As DataFrame

Parameters

partitionExprs
Column[]

Partitioning expressions

Returns

DataFrame object

Applies to