1 00:00:00,240 --> 00:00:07,530 Well, so in this session, I'm going to consider this statement in which I have to explore the account 2 00:00:07,680 --> 00:00:09,410 holder distribution. 3 00:00:09,420 --> 00:00:12,650 So these are exactly my column. 4 00:00:12,660 --> 00:00:20,940 The very first one is my securities account and the second one is mine, this one, which is my CD account. 5 00:00:21,180 --> 00:00:26,550 So I have to consider both this feature for analysis purposes. 6 00:00:26,550 --> 00:00:34,200 In all our previous session, we have gone through the various critical analysis considering our Lochley 7 00:00:34,200 --> 00:00:41,640 for the interactive resource so very close to what we have to do as we have to create a new column, 8 00:00:41,640 --> 00:00:50,640 let's say, for account holder category in which I have to assign a category depending upon what exactly 9 00:00:50,640 --> 00:00:58,650 the security account and what is the account of a particular customer that is going to apply for the 10 00:00:58,670 --> 00:01:01,530 loan in a bank so very fast. 11 00:01:01,590 --> 00:01:03,800 I'm just going to define some function. 12 00:01:04,050 --> 00:01:04,980 That's a function. 13 00:01:04,980 --> 00:01:14,970 Name is security, underscore KDDI and whatever role it will receive or whatever and it will receive 14 00:01:15,210 --> 00:01:15,960 on that. 15 00:01:16,080 --> 00:01:20,850 Basically, I have to add some of the conditions over here. 16 00:01:20,860 --> 00:01:31,410 So my condition is if the rule of this securities account so here I'm going to say security account 17 00:01:31,520 --> 00:01:32,960 nor security code. 18 00:01:33,090 --> 00:01:37,040 It is basically securities underscore. 19 00:01:37,530 --> 00:01:39,120 Let's say I'm going to check. 20 00:01:39,630 --> 00:01:40,220 Yeah. 21 00:01:40,530 --> 00:01:43,860 What are the total columns in my frame. 22 00:01:44,190 --> 00:01:47,910 So you will see this is exactly my first column. 23 00:01:48,570 --> 00:01:53,120 So I'm just going to copy from here and let's say I'm just going to paste over here. 24 00:01:53,640 --> 00:01:55,680 This is exactly my first condition. 25 00:01:56,010 --> 00:01:59,550 And here I'm going to say equal equals to one. 26 00:01:59,760 --> 00:02:02,310 So this will become my very first condition. 27 00:02:02,580 --> 00:02:10,740 And now here I'm going to add a second condition as a rule of this account. 28 00:02:10,740 --> 00:02:21,460 So I want to see a CD account it Callicles to one, and then I have to add over here column. 29 00:02:21,780 --> 00:02:28,910 And basically I have to insert all this condition in this pattern to say so. 30 00:02:28,920 --> 00:02:38,220 Now, basically, I have to return hold securities and deposit, because in what category I have, security 31 00:02:38,220 --> 00:02:42,220 is one and CDs account equal equals to one. 32 00:02:42,780 --> 00:02:46,650 So here I'm going to say holes. 33 00:02:47,070 --> 00:02:47,430 Good. 34 00:02:48,630 --> 00:02:52,200 And let's say deposit. 35 00:02:52,560 --> 00:02:54,750 So this is exactly my very first condition. 36 00:02:55,080 --> 00:03:01,890 And now I have to basically copy this and then I have to add another condition. 37 00:03:02,190 --> 00:03:09,750 So very first, I have to do this live and basically I have to remove this if the second one condition 38 00:03:09,750 --> 00:03:14,510 is the security account equally close to zero. 39 00:03:15,000 --> 00:03:22,790 So this is exactly my second condition and account equally close to also zero. 40 00:03:23,310 --> 00:03:29,280 And this time it will become doesn't hold security as well. 41 00:03:29,280 --> 00:03:33,510 As I can see, it doesn't equal security or deposit. 42 00:03:33,990 --> 00:03:40,710 Then again, I have to just copy this and this time I have to be stored here. 43 00:03:41,160 --> 00:03:45,420 And this time, let's say I have to say this is equally close to one. 44 00:03:46,050 --> 00:03:53,130 And here I'm going to see holes, all the security deposit. 45 00:03:53,130 --> 00:03:55,530 So you can do this as well. 46 00:03:55,920 --> 00:04:02,840 Then basically you can add another condition using ELIF or you can use El's as well. 47 00:04:03,570 --> 00:04:08,550 So I'm going to say equal to zero and this time this becomes one. 48 00:04:08,880 --> 00:04:16,620 To this day my condition is hols only deposit so holds on the deposit you have to remove. 49 00:04:16,620 --> 00:04:18,590 This does not as well. 50 00:04:19,110 --> 00:04:22,910 So this is exactly my the end that function. 51 00:04:23,250 --> 00:04:28,890 So just execute it and now you have to apply this function on your data frame. 52 00:04:29,010 --> 00:04:32,740 So I'm going to see data not apply. 53 00:04:33,150 --> 00:04:42,840 Now you have to use this function and X is equal to one whatever value it will return me. 54 00:04:43,290 --> 00:04:54,830 I'm going to say data of, let's say, defining new function name as account holder on this score category. 55 00:04:55,620 --> 00:04:59,040 So you have to use assignment operator has. 56 00:05:00,320 --> 00:05:01,730 Stole all this stuff. 57 00:05:01,920 --> 00:05:09,530 So just execute it and now if you are going to call ahead on your data, you will see a new column has 58 00:05:09,530 --> 00:05:17,450 been added in your data frame, which is account whole category, which is basically responding to the 59 00:05:17,500 --> 00:05:21,340 securities account as well as this account. 60 00:05:22,370 --> 00:05:25,930 So now I would use Lochley over here. 61 00:05:26,240 --> 00:05:36,050 So ready for what I am going to do, guys, in values, I'm going to say data of Agong underscore Holder 62 00:05:36,050 --> 00:05:43,980 in the category dark value on a score goals so it will receive all the value. 63 00:05:44,270 --> 00:05:50,870 Let's say I'm going to bring it as well for all your simplicity. 64 00:05:50,900 --> 00:05:55,040 So you will see this value contains all this value. 65 00:05:55,080 --> 00:06:01,550 So if you are going to call in that, you will see it contains all the index of your data. 66 00:06:01,940 --> 00:06:09,990 So what I have to do, let's say I'm going to call pie chart again so that you can copy from here the 67 00:06:11,120 --> 00:06:15,050 syntax of this pie or you can manually type over here as well. 68 00:06:15,770 --> 00:06:19,810 So this is exactly my data in values. 69 00:06:19,820 --> 00:06:23,510 I have basically values and in name. 70 00:06:24,680 --> 00:06:31,730 I have values dot index, and if you want to play with title, you can play it as well. 71 00:06:31,760 --> 00:06:32,580 It's all up to you. 72 00:06:32,750 --> 00:06:38,870 So just executer using of enter and it will return with this beautiful interactive resource. 73 00:06:38,990 --> 00:06:47,060 So if you have to transform this pie chart, you can see we can see that almost eighty seven percent 74 00:06:47,060 --> 00:06:56,120 of customers do not hold any security or any deposit and basically three percent, this is basically 75 00:06:56,120 --> 00:07:02,170 three percent that whole board security as well as deposit. 76 00:07:02,180 --> 00:07:09,020 It will be good if we encourage this 87 percent of the customers to open any of the accounts. 77 00:07:09,020 --> 00:07:12,260 So it will basically improve the assets of the bank. 78 00:07:12,530 --> 00:07:19,970 So that will be our main goal to enhance our business, to maximize the profit of the bank. 79 00:07:20,180 --> 00:07:22,130 So I hope you will love the session. 80 00:07:22,280 --> 00:07:22,980 Thank you. 81 00:07:23,210 --> 00:07:24,200 Have a nice day. 82 00:07:24,230 --> 00:07:25,130 Keep learning. 83 00:07:25,580 --> 00:07:26,290 Keep going.