Share via


SparkSession.Range 方法

定义

重载

Range(Int64)

使用名为 id 的单个列创建数据帧,其中包含从 0 到结束 (独占) 的元素,步骤值为 1。

Range(Int64, Int64)

使用名为 id 的单个列创建 DataFrame,其中包含从开始到结束 (步骤值为 1 的排他) 范围内的元素。

Range(Int64, Int64, Int64)

使用名为 id 的单个列创建 DataFrame,其中包含从开始到结束 (具有步骤值的排他) 范围内的元素。

Range(Int64, Int64, Int64, Int32)

使用名为 id 的单个列创建 DataFrame,其中包含从开始到结束 (具有步骤值且指定分区号的排他) 范围内的元素。

Range(Int64)

使用名为 id 的单个列创建数据帧,其中包含从 0 到结束 (独占) 的元素,步骤值为 1。

public Microsoft.Spark.Sql.DataFrame Range (long end);
member this.Range : int64 -> Microsoft.Spark.Sql.DataFrame
Public Function Range (end As Long) As DataFrame

参数

end
Int64

结束值 (排他)

返回

DataFrame 对象

适用于

Range(Int64, Int64)

使用名为 id 的单个列创建 DataFrame,其中包含从开始到结束 (步骤值为 1 的排他) 范围内的元素。

public Microsoft.Spark.Sql.DataFrame Range (long start, long end);
member this.Range : int64 * int64 -> Microsoft.Spark.Sql.DataFrame
Public Function Range (start As Long, end As Long) As DataFrame

参数

start
Int64

起始值

end
Int64

结束值 (排他)

返回

DataFrame 对象

适用于

Range(Int64, Int64, Int64)

使用名为 id 的单个列创建 DataFrame,其中包含从开始到结束 (具有步骤值的排他) 范围内的元素。

public Microsoft.Spark.Sql.DataFrame Range (long start, long end, long step);
member this.Range : int64 * int64 * int64 -> Microsoft.Spark.Sql.DataFrame
Public Function Range (start As Long, end As Long, step As Long) As DataFrame

参数

start
Int64

起始值

end
Int64

结束值 (排他)

step
Int64

创建范围时要使用的步骤值

返回

DataFrame 对象

适用于

Range(Int64, Int64, Int64, Int32)

使用名为 id 的单个列创建 DataFrame,其中包含从开始到结束 (具有步骤值且指定分区号的排他) 范围内的元素。

public Microsoft.Spark.Sql.DataFrame Range (long start, long end, long step, int numPartitions);
member this.Range : int64 * int64 * int64 * int -> Microsoft.Spark.Sql.DataFrame
Public Function Range (start As Long, end As Long, step As Long, numPartitions As Integer) As DataFrame

参数

start
Int64

起始值

end
Int64

结束值 (排他)

step
Int64

创建范围时要使用的步骤值

numPartitions
Int32

数据帧的分区数

返回

DataFrame 对象

适用于