SparkSession.CreateDataFrame Method

Definition

Overloads

CreateDataFrame(IEnumerable<String>)

Creates a Dataframe given data as IEnumerable of type String

CreateDataFrame(IEnumerable<Nullable<Int32>>)

Creates a Dataframe given data as IEnumerable of type Nullable<T>

CreateDataFrame(IEnumerable<Nullable<Double>>)

Creates a Dataframe given data as IEnumerable of type Nullable<T>

CreateDataFrame(IEnumerable<Nullable<Boolean>>)

Creates a Dataframe given data as IEnumerable of type Nullable<T>

CreateDataFrame(IEnumerable<Boolean>)

Creates a Dataframe given data as IEnumerable of type Boolean

CreateDataFrame(IEnumerable<Double>)

Creates a Dataframe given data as IEnumerable of type Double

CreateDataFrame(IEnumerable<GenericRow>, StructType)

Creates a DataFrame from an IEnumerable containing GenericRows using the given schema. It is important to make sure that the structure of every GenericRow of the provided IEnumerable matches the provided schema. Otherwise, there will be runtime exception.

CreateDataFrame(IEnumerable<Timestamp>)

Creates a Dataframe given data as IEnumerable of type Timestamp

CreateDataFrame(IEnumerable<Date>)

Creates a Dataframe given data as IEnumerable of type Date

CreateDataFrame(IEnumerable<Int32>)

Creates a Dataframe given data as IEnumerable of type Int32

CreateDataFrame(IEnumerable<String>)

Creates a Dataframe given data as IEnumerable of type String

public Microsoft.Spark.Sql.DataFrame CreateDataFrame (System.Collections.Generic.IEnumerable<string> data);
member this.CreateDataFrame : seq<string> -> Microsoft.Spark.Sql.DataFrame
Public Function CreateDataFrame (data As IEnumerable(Of String)) As DataFrame

Parameters

Returns

Dataframe object

Applies to

CreateDataFrame(IEnumerable<Nullable<Int32>>)

Creates a Dataframe given data as IEnumerable of type Nullable<T>

public Microsoft.Spark.Sql.DataFrame CreateDataFrame (System.Collections.Generic.IEnumerable<Nullable<int>> data);
member this.CreateDataFrame : seq<Nullable<int>> -> Microsoft.Spark.Sql.DataFrame
Public Function CreateDataFrame (data As IEnumerable(Of Nullable(Of Integer))) As DataFrame

Parameters

Returns

Dataframe object

Applies to

CreateDataFrame(IEnumerable<Nullable<Double>>)

Creates a Dataframe given data as IEnumerable of type Nullable<T>

public Microsoft.Spark.Sql.DataFrame CreateDataFrame (System.Collections.Generic.IEnumerable<Nullable<double>> data);
member this.CreateDataFrame : seq<Nullable<double>> -> Microsoft.Spark.Sql.DataFrame
Public Function CreateDataFrame (data As IEnumerable(Of Nullable(Of Double))) As DataFrame

Parameters

Returns

Dataframe object

Applies to

CreateDataFrame(IEnumerable<Nullable<Boolean>>)

Creates a Dataframe given data as IEnumerable of type Nullable<T>

public Microsoft.Spark.Sql.DataFrame CreateDataFrame (System.Collections.Generic.IEnumerable<Nullable<bool>> data);
member this.CreateDataFrame : seq<Nullable<bool>> -> Microsoft.Spark.Sql.DataFrame
Public Function CreateDataFrame (data As IEnumerable(Of Nullable(Of Boolean))) As DataFrame

Parameters

Returns

Dataframe object

Applies to

CreateDataFrame(IEnumerable<Boolean>)

Creates a Dataframe given data as IEnumerable of type Boolean

public Microsoft.Spark.Sql.DataFrame CreateDataFrame (System.Collections.Generic.IEnumerable<bool> data);
member this.CreateDataFrame : seq<bool> -> Microsoft.Spark.Sql.DataFrame
Public Function CreateDataFrame (data As IEnumerable(Of Boolean)) As DataFrame

Parameters

Returns

Dataframe object

Applies to

CreateDataFrame(IEnumerable<Double>)

Creates a Dataframe given data as IEnumerable of type Double

public Microsoft.Spark.Sql.DataFrame CreateDataFrame (System.Collections.Generic.IEnumerable<double> data);
member this.CreateDataFrame : seq<double> -> Microsoft.Spark.Sql.DataFrame
Public Function CreateDataFrame (data As IEnumerable(Of Double)) As DataFrame

Parameters

Returns

Dataframe object

Applies to

CreateDataFrame(IEnumerable<GenericRow>, StructType)

Creates a DataFrame from an IEnumerable containing GenericRows using the given schema. It is important to make sure that the structure of every GenericRow of the provided IEnumerable matches the provided schema. Otherwise, there will be runtime exception.

public Microsoft.Spark.Sql.DataFrame CreateDataFrame (System.Collections.Generic.IEnumerable<Microsoft.Spark.Sql.GenericRow> data, Microsoft.Spark.Sql.Types.StructType schema);
member this.CreateDataFrame : seq<Microsoft.Spark.Sql.GenericRow> * Microsoft.Spark.Sql.Types.StructType -> Microsoft.Spark.Sql.DataFrame
Public Function CreateDataFrame (data As IEnumerable(Of GenericRow), schema As StructType) As DataFrame

Parameters

data
IEnumerable<GenericRow>

List of Row objects

schema
StructType

Schema as StructType

Returns

DataFrame object

Applies to

CreateDataFrame(IEnumerable<Timestamp>)

Creates a Dataframe given data as IEnumerable of type Timestamp

public Microsoft.Spark.Sql.DataFrame CreateDataFrame (System.Collections.Generic.IEnumerable<Microsoft.Spark.Sql.Types.Timestamp> data);
member this.CreateDataFrame : seq<Microsoft.Spark.Sql.Types.Timestamp> -> Microsoft.Spark.Sql.DataFrame
Public Function CreateDataFrame (data As IEnumerable(Of Timestamp)) As DataFrame

Parameters

Returns

Dataframe object

Applies to

CreateDataFrame(IEnumerable<Date>)

Creates a Dataframe given data as IEnumerable of type Date

public Microsoft.Spark.Sql.DataFrame CreateDataFrame (System.Collections.Generic.IEnumerable<Microsoft.Spark.Sql.Types.Date> data);
member this.CreateDataFrame : seq<Microsoft.Spark.Sql.Types.Date> -> Microsoft.Spark.Sql.DataFrame
Public Function CreateDataFrame (data As IEnumerable(Of Date)) As DataFrame

Parameters

Returns

Dataframe object

Applies to

CreateDataFrame(IEnumerable<Int32>)

Creates a Dataframe given data as IEnumerable of type Int32

public Microsoft.Spark.Sql.DataFrame CreateDataFrame (System.Collections.Generic.IEnumerable<int> data);
member this.CreateDataFrame : seq<int> -> Microsoft.Spark.Sql.DataFrame
Public Function CreateDataFrame (data As IEnumerable(Of Integer)) As DataFrame

Parameters

Returns

Dataframe object

Applies to