Well, so in this session, I'm going to consider this statement in which I have to explore the account
holder distribution.
So these are exactly my column.
The very first one is my securities account and the second one is mine, this one, which is my CD account.
So I have to consider both this feature for analysis purposes.
In all our previous session, we have gone through the various critical analysis considering our Lochley
for the interactive resource so very close to what we have to do as we have to create a new column,
let's say, for account holder category in which I have to assign a category depending upon what exactly
the security account and what is the account of a particular customer that is going to apply for the
loan in a bank so very fast.
I'm just going to define some function.
That's a function.
Name is security, underscore KDDI and whatever role it will receive or whatever and it will receive
on that.
Basically, I have to add some of the conditions over here.
So my condition is if the rule of this securities account so here I'm going to say security account
nor security code.
It is basically securities underscore.
Let's say I'm going to check.
Yeah.
What are the total columns in my frame.
So you will see this is exactly my first column.
So I'm just going to copy from here and let's say I'm just going to paste over here.
This is exactly my first condition.
And here I'm going to say equal equals to one.
So this will become my very first condition.
And now here I'm going to add a second condition as a rule of this account.
So I want to see a CD account it Callicles to one, and then I have to add over here column.
And basically I have to insert all this condition in this pattern to say so.
Now, basically, I have to return hold securities and deposit, because in what category I have, security
is one and CDs account equal equals to one.
So here I'm going to say holes.
Good.
And let's say deposit.
So this is exactly my very first condition.
And now I have to basically copy this and then I have to add another condition.
So very first, I have to do this live and basically I have to remove this if the second one condition
is the security account equally close to zero.
So this is exactly my second condition and account equally close to also zero.
And this time it will become doesn't hold security as well.
As I can see, it doesn't equal security or deposit.
Then again, I have to just copy this and this time I have to be stored here.
And this time, let's say I have to say this is equally close to one.
And here I'm going to see holes, all the security deposit.
So you can do this as well.
Then basically you can add another condition using ELIF or you can use El's as well.
So I'm going to say equal to zero and this time this becomes one.
To this day my condition is hols only deposit so holds on the deposit you have to remove.
This does not as well.
So this is exactly my the end that function.
So just execute it and now you have to apply this function on your data frame.
So I'm going to see data not apply.
Now you have to use this function and X is equal to one whatever value it will return me.
I'm going to say data of, let's say, defining new function name as account holder on this score category.
So you have to use assignment operator has.
Stole all this stuff.
So just execute it and now if you are going to call ahead on your data, you will see a new column has
been added in your data frame, which is account whole category, which is basically responding to the
securities account as well as this account.
So now I would use Lochley over here.
So ready for what I am going to do, guys, in values, I'm going to say data of Agong underscore Holder
in the category dark value on a score goals so it will receive all the value.
Let's say I'm going to bring it as well for all your simplicity.
So you will see this value contains all this value.
So if you are going to call in that, you will see it contains all the index of your data.
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
syntax of this pie or you can manually type over here as well.
So this is exactly my data in values.
I have basically values and in name.
I have values dot index, and if you want to play with title, you can play it as well.
It's all up to you.
So just executer using of enter and it will return with this beautiful interactive resource.
So if you have to transform this pie chart, you can see we can see that almost eighty seven percent
of customers do not hold any security or any deposit and basically three percent, this is basically
three percent that whole board security as well as deposit.
It will be good if we encourage this 87 percent of the customers to open any of the accounts.
So it will basically improve the assets of the bank.
So that will be our main goal to enhance our business, to maximize the profit of the bank.
So I hope you will love the session.
Thank you.
Have a nice day.
Keep learning.
Keep going.