Pyspark, How to transpose single row column to multiple rows using coalesce and explode function.

preview_player
Показать описание
In this video, I will discuss how to explode columns of single rows to multiple rows which having null values present in some of the columns using coalesce and explode funtion. Video also contains code examples that may be helpful when you are doing practice.
GitHub link for the code and dataset is below.

#Pysaprk, #Saprk, #sparksunctions
Рекомендации по теме
Комментарии
Автор

i have the same problem but i have around 20 columns and a column could change. How i can deal with this?

jeffersonerick
Автор

Is there an easy way we can calculate standard deviation row wise in pyspark? for example there is a table of 4 guys arrival time recorded from Mon to Fri. And I want to calculate stddev for per guy. In real terms I have a big dataset with 100+ columns and I create 12 columns with lag of Colmn X and wants to calculate stddev.

loopbloke