0

I have a pyspark df who's schema looks like this

 root
 |-- company: struct (nullable = true)
 |    |-- A: long(nullable = true)
 |    |-- A_timestamp: long(nullable = true)
 |    |-- B: long(nullable = true)
 |    |-- B_timestamp: long(nullable = true)
 |    |-- C: long(nullable = true)
 |    |-- C_timestamp: long(nullable = true)
 |    |-- D: long(nullable = true)
 |    |-- D_timestamp: long(nullable = true)
 |    |-- E: long(nullable = true)
 |    |-- E_timestamp: long(nullable = true)

I want the final format of this dataframe with 4 columns to look like this enter image description here

Please help me to solve this using Pyspark.

0 Answers0