I have a PySpark dataframe which has column names which are unique_id's generated by UUID library. So I cannot query using column names. Each row in this pySpark dataframe has 1 "non null value". How do i create a new column which only has this 1 non null value? I have shared a sample below where "new_column" is the column I would like to create. Any help is appreciated. Thanks in advance
col1 col2 col3 col4 new_column
Null Null xyz Null xyz
I tried looking at dataframe operations but i was unable to find any relevant solution.