 Hello, welcome to SSUnitech Social Decide and this is continuation of PySpark tutorial. So in this video we are going to see about the list and min function. So as per today's agenda first we will see about the list function then we will see about the min function. So what is the list function? So in PySpark SQL function method return the minimum value of each row in specified columns. In case of the min function it will be going to get the minimum value in a single column. So what does it mean? So let's assume we are having this data frame. If our requirement is we want to check the minimum value on this row particular for the math physics and chemistry marks then we can use the list function. So in this scenario list function will be helpful. But our requirement is we just want to check the total marks first and what is the minimum of those. So like total marks will be going to add the math plus physics plus chemistry and then we are required to check the minimum on that total marks. Then that will be minimum function can be used. So minimum function will be used in a single column and list function will be working in the row basis. So let me quickly go inside the browser and we will try to see in practical. So here let me try to create this data frame as it will be having the same metadata as we have seen in the slide. So here first I am going to create the total column. So how we can do that? So for that we can simply adding the math plus physics plus chemistry marks. So let me use df dot select and under that let me select df dot and here I am going to add the math plus df dot physics plus. Here we could use chemistry and let me use display for displaying the data for this operation. And here we could see it is having a single column for total marks and if we want to check the minimum between these then we could simply use min function here and we can execute and we will see the output. So that will be 263 that is the minimum value between those three values. The next thing if our requirement we just want to check the minimum value on physics chemistry and math marks then we could use the least function. So for that let me use df dot select one more time. Let me select all the column first and the second column here I am going to use the least function and it is asking the columns by which we just want to take the least. So I am going to use the math that is the first column. Second column will be physics and the third column that will be chemistry and let me use display so we will see the output of this. So here it will be having the least that we could see in math got 85 for physics 90 and 88 for chemistry. So 85 is the minimum between these three so that is why we could see 85. Similarly here we could see 87 is the minimum so 87 is coming and here we could see 88 is minimum so 88 we could see in the least. So least function is working on the row basis and we will be picking the minimum on that particular row. So I hope guys you have understood when we can use the least function and when we can use the min function and what is the difference between these two. So thank you so much for watching this video see you in the next video.