Using pivot in pyspark I was able to get the below values. Note that columns T1..T4 are dynamically generated from pivot output, therefore cannot predict if there will be more or less.
+--------------------+-----------+----------------+-------------+-------------+
| ID |T1 | T2 | T3 | T4 |
+--------------------+-----------+----------------+-------------+-------------+
|15964021641455171213| 0.000000| 0.0| 0E-10|23.1500000000|
|15964021641455171213| 55.560000|40.7440000000002|18.5200000000| 0E-10|
+--------------------+-----------+----------------+-------------+-------------+
Expected Result:
+--------------------+-----------+----------------+-------------+-------------+
| ID |T1 | T2 | T3 | T4 |
+--------------------+-----------+----------------+-------------+-------------+
|15964021641455171213| 55.560000|40.7440000000002|18.5200000000|23.1500000000|
+--------------------+-----------+----------------+-------------+-------------+
Any help is appreciated !