I have a PySpark dataframe that has a couple of fields, e.g.:
| Id | Name | Surname | 
|---|---|---|
| 1 | John | Johnson | 
| 2 | Anna | Maria | 
I want to create a new column that would mix the values of other comments into a new string. Desired output is:
| Id | Name | Surname | New | 
|---|---|---|---|
| 1 | John | Johnson | Hey there John Johnson! | 
| 2 | Anna | Maria | Hey there Anna Maria! | 
I'm trying to do (pseudocode):
df = df.withColumn("New", "Hey there " + Name + " " + Surname + "!")
How can this be achieved?
 
    