DataFrame.WithColumn(String, Column) Method

Definition

Returns a new DataFrame by adding a column or replacing the existing column that has the same name.

C#
public Microsoft.Spark.Sql.DataFrame WithColumn(string colName, Microsoft.Spark.Sql.Column col);

Parameters

colName
String

Name of the new column

col
Column

Column expression for the new column

Returns

DataFrame object

Applies to

Product Versions
Microsoft.Spark latest