Let's say I've a dataframe something like this,
+---+----+------+
|id |name|salary|
+---+----+------+
|10 |abc |100 |
+---+----+------+
And I would like to pivot/transpose the data so that the output looks like,
+--------+----+
|col_name|data|
+--------+----+
|id |10 |
|name |abc |
|salary |100 |
+--------+----+
How would I do this using pyspark.