I have the following dataframe
+-----+-----+-----+ .......+-------+
|item1|item2|item3|........| itemN |
+-----+-----+-----+........|-------+
| v1| v2| v3|........| vN----+
| v4| v5| v6|........| v2N---+
+-----+-----+-----+........|-------+
here item1 , item2 and item3 are the column names and table consists of 1 row v1,v2,v3.
I want to transform it into
colA colB
item1 v1
item2 v2
item3 v3
. .
. .
. .
Here there are two columns lets say colA and colB and rows are as shown.
How to do this transformation in spark using scala?