SparkSession.Range Method

Definition

Overloads

Range(Int64)

Creates a DataFrame with a single column named id, containing elements in a range from 0 to end (exclusive) with step value 1.

Range(Int64, Int64)

Creates a DataFrame with a single column named id, containing elements in a range from start to end (exclusive) with step value 1.

Range(Int64, Int64, Int64)

Creates a DataFrame with a single column named id, containing elements in a range from start to end (exclusive) with a step value.

Range(Int64, Int64, Int64, Int32)

Creates a DataFrame with a single column named id, containing elements in a range from start to end (exclusive) with a step value, with partition number specified.

Range(Int64)

Creates a DataFrame with a single column named id, containing elements in a range from 0 to end (exclusive) with step value 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

Parameters

end
Int64

The end value (exclusive)

Returns

DataFrame object

Applies to

Range(Int64, Int64)

Creates a DataFrame with a single column named id, containing elements in a range from start to end (exclusive) with step value 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

Parameters

start
Int64

The start value

end
Int64

The end value (exclusive)

Returns

DataFrame object

Applies to

Range(Int64, Int64, Int64)

Creates a DataFrame with a single column named id, containing elements in a range from start to end (exclusive) with a step value.

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

Parameters

start
Int64

The start value

end
Int64

The end value (exclusive)

step
Int64

Step value to use when creating the range

Returns

DataFrame object

Applies to

Range(Int64, Int64, Int64, Int32)

Creates a DataFrame with a single column named id, containing elements in a range from start to end (exclusive) with a step value, with partition number specified.

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

Parameters

start
Int64

The start value

end
Int64

The end value (exclusive)

step
Int64

Step value to use when creating the range

numPartitions
Int32

The number of partitions of the DataFrame

Returns

DataFrame object

Applies to