1

How i can transpose the dataframe in pyspark.

My Table is shown as below -

|two|0.6|1.2|1.7|1.5|1.4|2.0|
|one|0.3|1.2|1.3|1.5|1.4|1.0|

i want to transpose to

+---+---+
|two|one|
+---+---+
|0.6|0.3|
|1.2|1.2|
|1.7|1.3|
|1.5|1.5|
|1.4|1.4|
|2.0|1.0|
+---+---+
pault
  • 37,170
  • 13
  • 92
  • 132

0 Answers0