How can i create a multi column check and create a comma separated string and get it added as a new column at the end of a dataframe. Ex I need to check if i have a List(22,33,44,55,66,77). The NewCol should be updated as below.
val list = List(4,5,10,7,2)
val df = List(“a”,“b”,“c”,“d”,“e”).toDF(“row1”)
The above example very much works for me. But if my df is multi columns how can get the new df with all columns in first df appended with row2.