DataFrame.withColumn
Adds or replaces one column by name: an existing column of that name is replaced in place, otherwise the column is appended (with a height check).
Parameters
col | the column to add or replace |
Returns
the new frame.
Throws
DataFrameException when the height differs from the frame's.