Share via


Functions.First Method

Definition

Overloads

First(Column, Boolean)

Returns the first value of a column in a group.

First(String, Boolean)

Returns the first value of a column in a group.

First(Column, Boolean)

Returns the first value of a column in a group.

public static Microsoft.Spark.Sql.Column First (Microsoft.Spark.Sql.Column column, bool ignoreNulls = false);
static member First : Microsoft.Spark.Sql.Column * bool -> Microsoft.Spark.Sql.Column
Public Shared Function First (column As Column, Optional ignoreNulls As Boolean = false) As Column

Parameters

column
Column

Column to apply

ignoreNulls
Boolean

To ignore null or not

Returns

Column object

Remarks

The function by default returns the first values it sees. It will return the first non-null value it sees when ignoreNulls is set to true. If all values are null, then null is returned.

Applies to

First(String, Boolean)

Returns the first value of a column in a group.

public static Microsoft.Spark.Sql.Column First (string columnName, bool ignoreNulls = false);
static member First : string * bool -> Microsoft.Spark.Sql.Column
Public Shared Function First (columnName As String, Optional ignoreNulls As Boolean = false) As Column

Parameters

columnName
String

Column name

ignoreNulls
Boolean

To ignore null or not

Returns

Column object

Remarks

The function by default returns the first values it sees. It will return the first non-null value it sees when ignoreNulls is set to true. If all values are null, then null is returned.

Applies to