 Hello, welcome to SSUnitech Social Decide and this is Continuation of PySpark tutorial. So in this video we are going to see about the Explode-Explode-Outer-Pose-Explode-Pose-Explode-Outer. So all these four functions we will see in this video. Before going forward if you haven't watched the last video of this video series so I would strongly recommend to watch that video where we have seen about the Explode function. So as per today's agenda first we will see Explode, then Explode-Outer, then Post-Explode, then Post-Explode-Outer. So what is the Explode function? It is used in PySpark data model to explode an array or map related column to rows. So in the last video we have seen how we can map related column converted to the rows. In this video we will see about the array type. So let me quickly go inside the browser and we will try to see in practical. So here in this notebook first I am going to import all these types. So here we can see this array type. So I am going to create two columns by array type. One is the skill and second is the work profile. And let me try to execute this so it will create a data frame. So here as we can see in this data frame we have name, skill, work profile, current state and previous state. So if you can see the third row here the skills are null. So let me try to do the Explode on this skill and then we will see the output of this. So let me use the df dot and here let me try to select the name. Next column let me select skill. We can use df dot skill. In the third column let me try to use the Explode. But Explode function we have to import first. So we can import from pyspark dot sql dot functions. Let me try to import all the functions. Here let me try to use the Explode and inside the Explode we can simply pass this skill column and let me put this another data frame that is df1 and we will see the output of this df1. Let me execute and we will see the output. So inside the Explode it should be skills not skill. So we can use skills and re-execute it. So here as we can see in this column that new column we have created we have exploded this. So James Smith we can see three times because adf scala and pyspark is there and if we can go here we can see this Michael Rose. So adf sql and pyspark for this but for the empty string if we can see this Williams so this is not appearing here. So if we are going to use the Explode and inside that column any particular column value is null for particular row then it will not be appear in output. So all the row will be gone. So how we can avoid this so we can use Explode underscore outer. So once we will use Explode underscore outer function it will be going to add those missing rows as well with the null as here you can see we can see this Williams skill is blank and in the column output it will be null but it will appear in the output. So while we are going to use the Explode function make sure if we are having the nulls inside particular array and we want to keep those rows so instead of using Explode we can go with the Explode underscore outer. Let me try to use the pose Explode what it will do will add the position of this array. So let me try to execute and we will see the output. So here we have added two times E so that's why we are getting this error it is post Explode so if you can see the output then here we can see this position. So it will also add the position along with the column. So in the position we can see 0 for the ADF 1 for the Scala and 2 for the PySpark. So similarly 0 position for ADF 1 for Scala and 2 for PySpark. So it will be going to add the position as well but again the problem is if we are having any empty or null in the input then it will not return anything for that particular employee. Then what we can do we can simply use pose Explode underscore outer. So it will be going to add that missing row as well. So earlier it was total 6 rows and now it is having total 7 rows we can verify from here or we can scroll and we can check. So that Williams is having null so we can see position as null and column value is also null. So this is the particular use of the Explode function Explode outer post Explode and post Explode outer. So I hope guys you have understood how we can use all these functions. Thank you so much for watching this video. If you like this video please subscribe our channel to get many more videos. See you in the next video.