DataFrame.Repartition Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
Repartition(Int32, Column[]) |
Returns a new |
Repartition(Int32) |
Returns a new |
Repartition(Column[]) |
Returns a new |
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