Welcome to SSUnitex, so see this side and this is continuation of PySpark tutorial. So in the last video of this video series, we have seen about the array type array and array contains function. So before going forward in this video, I would strongly recommend to watch that video if you haven't watched. So in this video, we are going to see about the map type, map key, map value and explode function. So these functions are very important. So what is the map type function? So basically map type function you can assume if your data is having the key and value pair that is in terms of python dictionary. If data is in dictionary format then map type will be there. So in PySpark it is calling as map type data type for key and value pair. And what is the map key? So map key is nothing but the key part of that data and what is the actual value that is the map value and then explode we will see. So as per the today's agenda, first we will see about map type. Then we will see map key, map values and then explode function. So explode function what is that? So it is used in PySpark data model to explode an array or map related column into rows. So let's assume if we are having any column which is the array type or that column is the map type. Then how we can convert those key value pairs into the rows we can use the explode function. So don't worry we will see in this video. So let me quickly go inside the browser and we will try to see in practical. So here as you can see first I have imported all the data types and after that in the data you can see we are having the country is the first column. Second is the state and what is the capital of that state we can see over here. So for Uttar Pradesh capital is Lucknow, similarly for Bihar is Patna, for MP is Bhopal, for Delhi is New Delhi. So like that we are having the data and this data we can see is having key and value pair. So this data is in Dixen reformat. Similarly for the second row the country is US and then we can see state and the capital of that state. Now how we can design the schema for this? So for designing the schema first we are required to use the stuck type. Under the stuck field here we can see we have total two columns. First is the country column and second is the state and capital combination column in the map type data type. So here first you can see I have designed this as country and the data type of that will be string. Second we can see state capital and similarly the data type of this will be map type and what will be the key and the value. So all the key is in string as well as the value is in string. So that is why the data type we have defined as string. Here we are simply creating the data frame. Let me try to execute this and we will see the output of this. So now here as we could see we have already printed the schema. If you can see here we are printing the schema as well. So the data that we can see is having country, India, US then state, capital over here. So this data is in map format. So we can see the schema so country is string format and then state, capital here the value is in map and this map will be having again two columns under that key and value there and both is the string format. So here we have used about the map type. Here we can see the state capital. So this state capital is in a key value pairs. So next we just want to create two additional columns here. First for the key and second for the value. So how we can do that? So for that we have to use the explode function. So first for it using the explode function we have to import it from the SQL library. So SQL dot functions then I am going to import all the functions. Now here I am going to use the DF dot I am going to use the select and inside the select I am going to specify the columns. So first I just want to this country column. Second I want to this state and capital column. Now here we just want to add two more additional columns for the key and value pair. So how we can get that? For that we can use the explode function. So inside the explode simply we have to pass this state and capital. So this state capital is having key and value pair. So it will automatically generate two columns and those two columns will be key and value. So let me try to see the output of this. So this is DF1. Let me try to execute and we will see the output of this. So here as this is the case sensitive so C should be in capital letter. Let me try to execute it again. Here you can see we have not explicitly defined this key and value. But while using the explode function it is automatically adding these two columns one for the key and second for the value. And how we are getting this we are getting this from here. So for India we can see total four rows we are having because in the key value pair we have total four rows Delhi, Bihar, MP and UP. For US we have total three rows. So that is why we can see three here. Now so this is the main purpose of using explode function. So the explode function can be used inside the array as well. So let me go and try to use this map key and map value function. So what map key and map value function will do? If you are going to use the map key then it will be going to fetch only key part from this state capital column. If you will be using map value it will fetch only value part from here. So let me quickly show you that. So let me try to remove this explode function from here. Let me execute so it will have only two columns as we can see. Now let me try to use map keys. So this function we can use and under that we can simply pass this state capital column. Now let me try to execute and we will see the output of this. So it is having this map key state capital. We can also specify the alias of this. So let me use the alias and under that we can call this as key. Let me execute and we will see the output. As we can see here we are having this is an array of only key like Delhi. If you can scroll down, Bihar, MP and UP. So only key part is coming here. You can also use the explode out of this. So what explode will do? It will be going to separate these array into different rows. So let me try to use the explode here and you will see we will be having this into different rows as we can see Delhi, Bihar, MP and UP. So like that we can split it. Now we can also use the value. So let me use the values instead of this keys. So what it will do? It will be going to return only the value part that you can see only the value part are coming. So now we are having values. So if you are going to use the explode function it will automatically split your dictionary into two different columns one for the key and second for the value. Finally you can also use the only key or only value part. So first you can use the map value or map key for the value and key respectively and after that we can use the explode to split that into different rows. So I hope guys you have understood how we can use the map type, map key, map value and explode function. So 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.


What's up guys my name is Glassfoot and welcome to Hades. A, um, I think it's a roguelike style game.  Hades, whose very name inspires fear and penitence. Reminding us of the inevitable fate which we all share.  Listen carefully.  Goodbye, father.  Cool. You're Hades' kid or something? I do know I'm trying to break my way out of hell. I think I get to play as some of the other guys I continue on in this game. What's this? I love these kinds of games. They're a lot of fun. I love hack and slash. Destroy everything style games. Especially if they're done well. Try and stop me.  More people to kill. There she is. Oh, what is this? It's got to be her. Then here goes nothing. In the name of Hades, Olympus, I accept this message. But yes, so basically you're playing as this character, Zagreus, who I think is the son of Hades. Not 100% sure. Not given a ton of lore. But as far as I know, I want to break out of hell. Which is awesome. And I can't wait. And this is going to be amazing. Hey, old noble cousin. Now let's get you from that miserable place. I'll see that all of us upon Olympus do our part, beginning here with me. The designs of these characters too are freaking great. That is awesome. Look for Athena. Oh, hello, divine dash. Oh, ruins of Athena. Let's try to attack stronger. Oh, okay. You can't hit me all the way where you are, goddess. But thank you. You know, this is awesome. I gotta stop running onto those. What's this? Okay. I need to find a way to- I can't heal myself. Oh, cool. I really need to find a way to heal myself. I'm just gonna keep destroying stuff. Maybe I'll get more health. Okay, okay, okay.  Oh, what's this? Hey, break stuff. Ooh. Oh, do I have more than one? Oh, god. Oh, Jesus. What do I choose? I'm going this way. All right. Oh, no. Okay. Oh, is this a roguelike? Oh, no. This is a roguelike, isn't it? Oh, boy. Damn it. I'm home. Oh, this is gonna be interesting. Yes, carry on, everyone. Don't mind me. Already. Who are you? Welcome to the house of Hades.  I know you. Okay.  Well, don't be sad though. Pretty much everybody dies sometime.  Some of us more than others. I just want to leave. You have come home. I'll just talk to you.  Such setbacks are inevitable and maybe overcome with effort and with time. You made contact with the goddess Athena. She shall be true to her word. I believe it next. I'm grateful that you put us into contact. I know you took a considerable risk in reaching out. The risk is not to me. I expected the Olympians would involve themselves in this eventually. Reveal to them no more than they already know. Are we understood? Yes, we are. Then go. There's my dad, there's Severus. You've returned. I'm just gonna have fun running around here for a minute. This might all get cut. Good to see you, lad. Despite the circumstances.  Remember, you're training out there. It's protracted around here. There's death. It's but another obstacle. And fear is for the weak. Take care, Achilles. Yo, that's awesome. So I love Greek mythology and all that kind of thing. That's why I wanted to play this game. The House of Hades. That dark and lavishly appointed lair of the underworld's king is home not just to him, but to his willful protony. You know I can hear you, old man. Yeah, but like I was saying, I personally love Greek mythology. I think it's a hell of a lot of fun. It's really interesting. But so it's really cool for me, at least, to see this kind of game based around Greek mythology with a freaking amazing art style. Let me pet Severus.  You know I'd take you if I could. Yeah, so he's right. He is. I can pet him. There's a good boy. Yay! Your fortunate Cerberus sees something new. Hey, pet doggy. What do you want, dad?  I told you nobody gets out of here whether alive or dead. Well, how was your wanton ransacking of my domain? I had fun, actually. Greetings, father. My ransacking was a delight to thank you for asking, so I'll just be on my way again. Be on your way indeed. What do I care? You shall never reach the surface. Go, see for yourself. Yeah, I'm gonna challenge that. Hey, room, I'm back. Heh. The bedchambers of Prince Zagreus lie in a perpetual state of utter disarray.  Good to know he's an average teenager. It's not that bad, is it? I can rest. I heard something with a mirror. Night and darkness guide me. That's awesome.  I don't want to rest. Let's go.  I can do this. I'll figure something out. I can escape from the courtyard back there. Ooh. Need more of those keys. Don't yourself need to get keys so I can steal stuff. Who can I leave here? Yay! Escape. Awesome. Time to go. Ooh. Okay. I'm about to talk to Zeus.  Your father's always been rather difficult and he's not so much as cold in quite some time. He'll have a better home where you belong. You're on a limb-bust. And to help you on your journey, have my blessing. Sweet. Old Uncle Zeus lending his support. Never thought I'd see the day or night. Whenever. No, no, no, no, no. Die. Let's get out of here. It's going to be mine.  That was my bad. Everything's gonna be destroyed! Pretty sure I want to check my dash. No, I lost. Well, I can't get to them. Good enough to eat. Get that power up, that attacker. You've got me. No way to patch up. Got to keep going. This is fun. This is a lot of fun. What is this supposed to be? This game's a lot of fun. There should be some way for me to regain health. Okay. Well, bye, Dad, again. Okay. Someday I'll go even farther. Yeah, that's true. But so that feels like a good place to end. That feels like a good place to end this episode. I hope you all enjoyed that. Yeah, I'm definitely going to be playing more of this, but yeah, I'll see you guys. But yeah, I'll see you all in the next video, whatever that is. But I hope you all have a fantastic day. And as always, peace out, guys.


Hi and welcome to the session. Let us discuss the following question. Question says, prove that if a plane has the intercepts a, b, c and is it a distance of p units from the origin, then 1 upon a square plus 1 upon b square plus 1 upon c square is equal to 1 upon p square. First of all, let us understand that if equation of the plane is ax plus by plus cz plus d is equal to 0, then intercepts a, b, c can be written as a is equal to minus d upon a, b is equal to minus d upon b and c is equal to minus d upon b. This is the key idea to solve the given question. Let us now start with the solution. Now we are given plane has intercepts a, b, c. Now let us assume that plane is of the form ax plus by plus cz is equal to minus d. Now we are given in the question that d is equal to p. So we can write this equation as ax plus by plus cz is equal to minus p. We know d is the distance of the plane from the origin. Here we are given that distance of the plane from the origin is p. Now from key idea we know intercept a is equal to minus p upon a. Now this further implies a is equal to minus p upon a. Also intercept b is equal to minus p upon b. Now this further implies b is equal to minus p upon intercept b. Similarly c is equal to minus p upon c. This implies c is equal to minus p upon intercept c. Now we know a, b and c are direction cosines of the normal to the plane. So a square plus b square plus c square is equal to 1. Now let us name this expression as 1. Now we will substitute values of a, b and c in this expression.  Now this further implies p square upon a square plus p square upon b square plus p square upon c square is equal to 1.  So we get if a plane has intercepts a, b, c and is at a distance of p units from the origin then 1 upon a square plus 1 upon b square plus 1 upon c square is equal to 1 upon p square. So this is our required proof. This completes the session. Hope you understood the solution. Take care and have a nice day.


Welcome to ToffeeTV. This is an Alan update. I feel like there should be some news, some breaking news sound there. It does sound like this is getting very, very close by. It sounds like we're on the verge. I'm sure people are watching. Oh yeah, we know we're on the verge but maybe just to calm people down a little bit and hopefully get it across that, you know, it sounds like it's a done deal but it's not completely sorted and over the line yet. Yeah, obviously we've looked at it. We've had it on the news. We focused on it when we done our centre midfield update, you know, transfer things for each position Alan was there. They started back in January, didn't they, with when obviously the transfer window opened and he was linked heavily with the move then in January to Everton and it's gone on month by month it seems. There's the connections there and he'd fallen out of favour a little bit with Gattuso at Napoli. I think the whole relationship with Napoli I think the crack started to appear when they wouldn't let them go to PSG, when PSG wanted them. And I think since then things have been on a bit of a downward spiral. I think PSG inquired about them again in January and Napoli wouldn't let them go. But obviously the links have been there with Everton all the way along and this always felt like, this always felt like Ancelotti's key sign and almost the one to come in, the one you trust, the one who knows formation and stuff like that. And that's how it's been going along and I know that when Andy's in we have a little bit of a laugh with Andy about age and stuff like that. But I think even Andy's agreed, it's the kind of sign that you would expect a manager of Ancelotti's quality to make because he's a tone setter. And so as that's gone on month by month and it's looked more lightly and more lightly. At first the numbers bounced around 60 million, 50 million, didn't ever, it was never going to happen. And then over the weekend we had kind of almost a breakthrough didn't we? It's thought to be around 25 million euros, that's including add-ons for a player who's 29. And I think you know we've had, obviously over the weekend we've had De La Renta saying it's basically done, our end's done, the two clubs have agreed on the terms. And what we're up to now is obviously the personal terms, which you know that you see particularly Mr Shearer, Shearer, not Alan Shearer, Nicola on Twitter saying how personal terms agreed months ago and all that. It's never the case with footballers because once there's agreement with a club the agents then fine tune those details. And I think that's where we're up to at the moment, there's an agreement in place with the two clubs. Alan will become an Everton player once the final bits of the personal terms and subject to medical of course. Yeah it's interesting I think that you mentioned there about you know this one's been mentioned quite a few times as we've been going along. And as has Hamas Rodriguez at different stages as well. I mentioned it when we got a remember, he said when we got anti-Latvians Rodriguez ain't coming back. I was saying it something. But sometimes that's what happens isn't it sometimes you have like that kind of that story that'll just pop up now and again and now he's been a lot like hotter than obviously Hamas Rodriguez but you always feel like the manager's been keeping an eye on these players because these are the ones that he really wants it. The players that could change up the squad even with the Corey as well he's always like you think about the last couple of years that's been bubbling off for the last couple of years hasn't it. Even just like in passing I remember when we played them when we drew the game we drew 2-2 and D scored that last minute and he scored and everyone was like that's what we need and even we had gone at the time and I remember people just come but that's what we need we need a player who's all over the pitch and it's funny the way some things just sometimes in football just stick around just stay around them you can change the manager and all kinds but these things just stay around so yeah Allens as we've said before on other videos he's definitely the player that the manager wants to come in and be that you know he mentioned didn't he mentioned that he mentioned that evolution rather than revolution and you think well if you buy if you bring three players in that that is an evolution that is that's not going mad that's bringing in three players or they're about stacking change things up for you and and start what I mean by that is start making the team the rest of the team and this is what we say when we have these conversations with Andy and I know there's we put a video the other day that was on one of our live at five it's that idea of you don't need to rip up the team and start again you just have to show them what the manager wants and sometimes this has always been my sort of philosophy or idea on this especially with leadership and and bringing in players who might be older is sometimes you need somebody just set the bar who shows everybody what the manager wants can explain it and can explain explain it but sometimes you need that fella who knows who just knows how to do it and I'm hoping that certainly with Alan and then maybe maybe with the other signings and that's what happens and all the other players just suddenly it suddenly clicks into place suddenly we start seeing players pressing in groups and doing exactly what the manager wants and hopefully that's the case and I think getting this one over the line would be the the first one and it will you know it's I think that's when I don't think fans get excited about these kind of signings in like or what are we going to say on the pitch he's going to do this and do that but the excited I think the excited fans because they go yes the manager's starting to get his his hands on this team yeah I think he I think he will he'll make a massive difference I think to us if he can replicate the form he's shown through the lazy amphonopoly because he's he's like a little bit of a mixture of everything I think he's he might have said it before and it's an old reference but he reminds me of Peter E when Peter E came into ever and that type of player who'd set the tempo go after the ball he can do a lot of things he's a good passer at the ball he can dribble he likes to tackle you know seeing Donut just in talking about him the other day he's added nails and he'll give everything this and that and sometimes when you have that player going to do it to a certain extent set the tempo because you go hurrying and things like that and this fella does it I mean we've got a the thing we used on the centre midfield video which is like you know tackles in the midfield third over 1.76 I think evidence midfielders at the moment are all under one way under one so it's almost double what we're seeing at the moment so that's an improvement presses in the middle third 15 and a half a game you know where there's we're probably averaging six maybe at the moment possession is just the pair nice he's having interceptions he's almost at six and how garner you should be around six or seven some games you'd be ten others you'd be three progressive passes seven and a half and the progressive runs 1.23 so his numbers are good his numbers are better than what we've got at the moment and that's what initially that's what you look about look for when you bring a player in is he better than what we've got it isn't you don't want it to be just marginally better because then you're going backwards but he's very different the one thing we've said many times whoever we've had in here arm and field plays we have all the same this is why gabamon mother made a big difference because he's very different to what we've got but the ones we have at the moment are all similar they all do like a similar job he doesn't he does a very different job and you mentioned the core ideas another one who does a very different job get around the pitch get into the penalty area of course goes well listen the three names you've just mentioned they've called him until he got those three and it's looking very positive at the moment i would be delighted because i've said all along we need the two centre midfield players and someone to play off the right rodríguez has played a lot of his games off the right hand side okay he's not a pacy dynamic winger but he's a supremely talented footballer who can come inside as well and he's got a great left foot it would why that would give me comfort is because and this is just the very selfish thing but it's the manager saying what i'm saying looking at that midfield and going that's horrific we need a two that's not good and he's gone on and he's trying to get two in there we need something off that side bang he's done that immediately and i think that gives you that confidence gabamon to come back as well gabamon as well you've got Gomez has got it up his game you're good enough mate off your pot you know so i think that's good but this fella seems now like we said before the gremans are in place with the clubs they're president once they say it's basically done i think it's probably one or two details with his agent and then it'll be a medical probably possibly tomorrow maybe i don't know next 24 48 hours get him done i mean i'd love to see him haven't i've got a game on saturday against Preston i'd love to see him even if it was 25 minutes at the end of the game he's been training so you know he's probably okay well he's only finished the season three or four weeks yeah of course yeah a couple of weeks ago so so you know hopefully this week we will get this time it look it's looking very likely now i think once once the downs are the finer details it's it's medical medical pendant alan will be coming ever and playing it's a really good sign let us know your thoughts you're excited for alan it's coming to everton is the kind of player we need and i'm in obviously as well he's 29 are you worried about the sell-on value gotta throw it out there you gotta ask the question let us know your thoughts in the comments don't forget to um stay tuned keep an eye out for toffee tv for all the latest when it breaks on any of these players we are after don't forget give this video a like subscribe and if you want more videos live videos live videos to talk about it to get involved to talk about all these players with us to get your points across join us on page and the link is in the description and you can sign up for a year now you can just jump in and go this is this is boss i'm just gonna sign up for a year the job done i was just checking his phone just to make sure just to make sure to see if i got a message just to see if it's done what does this message say you have to find out on page and click the link in the description we'll see you later


Look at us. Look at that. I can't get you. I'm so unlucky.  That's what it's about doing your best All right, sometimes it's not good enough, but it's your best. You'll be all right, you know Do dolphins vs. Chiefs for the AFC championship is gonna be lit ain't nobody trading for no Patrick's retain Why would they trade Patrick's retain? Why would they do that shit? It makes no sense. Yeah, we'll just trade a corner.  I did you guys see that? Did you guys see that like what?  It's just bad Like I this is why I'm losing games.  This is just not effective. It's just not effective, man No, for real. I'm really struggling like bad struggling man. Come on boys. Like we need better there No sack.  What I need a sack for bro. What I need a sack for right there Fumble What's the point in me playing defense? I can just throw the ball like that. What's the point of me playing defense right now? Boys, what's the point of it?  Oh, we got a sack Look at the boys.  Look at that.      Good read dude.  Come on.  I'm gonna be honest This has been the worst drive of the day for anybody I played This is the worst drive of the day right now.  That was a hard earn three. Can't lie.  Let's catch a pic here, dude What do you say boys? What do you say? What do you say? What do you say boys? I mean dawg just get my man all day right there like god. That was the worst heat I got all day. That was literally the worst heat I got all day.     Let me just pick. Come on, man. Let's check. Come on. Incomplete. What else is new?  For what? Why is our defense good right now boys? Why? Bounce!  There's no way that was real There's just no way after this game we pause There's no way there's literally no way after this game We pause there's no way a human being did that after after the way he's been playing offense Like there's no way That's criminal. That's criminal.    Huge Huge Bro, who was that? Was that a C-Roll on the outside? There's no way that was important Everybody was manned up Like the whole team was manned up when he, I think they were Maybe I had to recheck my art.  Come on Fumble. Thank you. Thank you Need it.    Oh my god. That's such that's my best double mable dot I mean the disengaged everybody disengaged right there everybody Patch adrian peterson Double mable. I'm gonna double mable. That's what I'm doing this play. I'm gonna double mable Since I'm gonna double mable. I'm gonna double mable. I'm gonna display display especially I'm gonna double mable display last play. I may be talking about something else, but display I'm definitely gonna double mable display Let's play maybe not double mable. I feel like I mean to do this. I feel like you gotta be aggressive there Like there's no way you do this and play double mable. God damn it, man. Come on Did he just play double mable again?  So you do it. I need Kelsey come for this three man.  He's always just been up because I'm gonna run the meta and I'm you know Whatever they tell me how to do I'm gonna do that. Yep. We're screaming kid. We're screaming.  No, sir. No, sir I guess cool. Let him catch it. I like dog.   I'm in regular kick.  Oh God, damn. I just I just would never unless I kick here I wouldn't I would because he can afford me getting a feel over here. I'm just do the way this game is going I'm just do to get us up, huh? Yep, there it is. Yep, just get it Let's go. No, we got it.  Run the ball here. Come on.  Why would he not just throw the flat? Why would he not throw the flat?  That's just miserable sequence Gotta end the game on offense the other way around gotta score another touchdown there.  Oh my god Oh, but I saw it here though. I I'm glad I did but I saw it here. He had like no deep blue, bro I saw right here when he hit the back of the end zone. See this I kind of wanted to throw him the ball But like I saw this play as it broke down.  And I would have been able to hit old del right there. Bang. Look at that That's a great route combo.  I didn't So I didn't put an angle route. I put a running back streak I mean, that's just steamy, dude. He had a deep third in the middle of the field Flats double mable Great catch, dude. If I would have dropped that I would have cried I would have cried. I might have retired if I would have dropped that I can't believe he didn't man up the running back, dude I should have angled and looking back. I should have angle routed the running back. Oh, that was so hot. Oh my god That was so hot. I can't lie.