I created a dataframe
'df1=spark.read.format("csv").option("delimiter","|").load(file)'
Now I want to select columns from that dataframe
df1.select("col1","col2","col3")
This works fine. But can I concat two columns in the same statement. consider col1 as age,col2 as firstname and col3 as lastname. I am looking for output as mentioned below combined first and last name. I know it can be done using sparksql. I want to know this can be done in the above df1.select() statement.Thanks
col1 col2col3
23 JohnHarper
20 MarshallMathers