 Hello, welcome to SSUnitex to see this side and this is continuation of PySpark tutorial. So in this video we are going to see how we can replace the null values. So in the last video of this video series we have seen about the isNull and isNotNull function. So by using the isNull and when clause we have seen how we can replace the null values. So here we are having these two functions by which directly we can replace the null values. So PySpark provides data frame which is for the fillNA and fill function. So these two functions can be used for replacing the null value. So let me quickly go inside the browser and we will try to see in practical. So here we have this data frame which is DF and it is containing the values for the sense order. And if we can go inside the output of this data frame then we can see for the item code and item names we are having the null values. So our requirement is we just want to replace all these null values by NA. So how we can replace it? So for that simply we can use data frame which is DF. Then here we can use NA. Then we have function that is the fill. So by using this fill we can simply replace null with NA. Let me put this in one of the data frame that is DF1 and let me see this DF1 and execute. So this time all null values should be replaced by NA for all these columns. So if we can scroll down side we will see like for the item code as well as the item name both null values has been replaced with NA. So our requirement is we don't want to replace the null value from the item code. We just want to replace the null value from the item name column only. So for that what you have to do? You have to add one more parameter on this fill function and that parameter we can specify the name of the column. So the name of the column is item name. Let me try to execute it. So here let me see whether the null value has been replaced only in the item name or not. If you can go in the downside we can see here we have NA that is replaced that is null has been replaced with the NA and item code is still having null. So this is the first way by which you can replace the null value. You can also specify the multiple columns here so we can add comma and after that we can add the second column that is the item code. Let me try to execute and we will see. So if you can scroll down then null value should be replaced in item code as well. So this is the first way by which we can replace it. The second way instead of using NA here we can directly use data frame dot fill NA. So both are having the same thing. Either you can go with the df dot NA dot fill or you can use df dot fill NA. So both will be returning the same output. Let me try to execute and we will show you. If you can go and scroll down then all the null value has been replaced with NA. So this is the way by which we can fill the null values with any another value. If we are not going to specify any parameter then all the string type of the column will be going to replaced if that is having null with NA. So here we have item code and item name only so that is replaced with NA. I hope guys you have understood how we can use the fill NA and fill function. Thank you so much for watching this video see you in the next video.