Tiger Analytics PySPark Interview Question - Split and Explode Functions in PySpark

preview_player
Показать описание
One of the PySpark questions recently asked in Tiger Analytics interview.
Given us Customers dataframe, We need to have separate record for each and every Customer.

In order to solve this questions, we used Split and Explode Functions. You will understand the functionality of Split and Explode Functions in this video

Mentioning the dataframe details here
data = [("John,Smith", "Canada"), ("Mike,David", "USA")]

Solution

Рекомендации по теме
Комментарии
Автор

Good series of videos. Please do more videos on Pyspark

kiranavvaru
Автор

SELECT VALUE AS NAME, COUNTRY FROM CUSTOMERS S CROSS APPLY string_split (S.NAMES, ', ')

vijay.s-llyq
welcome to shbcf.ru