All so in the previous session, we have done some of the very beautiful analysis, we have deal with
data processing stage, we have prepared our data for this beautiful pie chart.
So in this session, we are basically going to deal with this problem.
Statement in the very first one is I have to analyze customer on the basis of different different attributes
and off the grid.
I have to automate my all the analysis that I'm going to perform in this very first problem statement.
So second one statement is a little bit tricky.
So I'm going to show you how exactly an automated analysis by just writing a simple function in Python.
So the very first one is I have to analyze customer on the basis of education, status, income and
different different attributes as well.
So what I have to do right over here very first and is going to use Gartley for so that I will provide
you some interactive results.
So let's say I'm going to use plotty and in this I'm going to call my box plot and inbox box.
Got ready for if you are going to shift plus tab.
So that is exactly my native.
So here I'm going to see my data center and now let's say I have to analyze education and income.
I can see what type of income my customers are generated that have different different background of
education so far.
This basically, I'm going to say on X axis, let's say I have education.
So this is exactly my education.
Very first, I'm going to check whether education is available in my native or not.
So I'm simply going to say, DataDot Gollum's.
So you will see education is available over here and now on Y-axis.
Basically I need income.
So here I'm going to see Onvia says I have income.
Let's say I have to split my this box Volkskrant.
So very first I'm just going to be executed and I will show you later how exactly you can split this
bastard on the basis of, let's say, a personal loan.
So for this, I have to use this visit underscored Colden parameters.
So here you have to pass your personal loan.
You will see this exactly is that feature on which on the basis of you have to split your box.
So just copy paste over here.
And if you are going to again execute it now, you will see for personal loan equals to zero.
It means this is the scenario that a customer is not going to avail for a loan.
So in such scenarios, a customer who has education background as one, it means basically he is undergraduate.
So in case of undergraduate and he is not applying for a loan in such case, this exactly is a distribution
of all the customers.
Similarly, in case of if education background is one and the customer is going to apply for the loan.
So this exactly is a distribution of the customers where maximum income is one nine five and here exactly
minimum is 60 and median, which is exactly the middle value of the data.
So this exactly is one that's a type of influence.
How exactly you can fit inside for you this visa's or I can say Volkskrant.
So from this box start, you can see income of the customers who are, well, personal to this one are
almost same irrespective of their education background.
Let's say I have to analyze this stuff in very depth.
So in such case, I can say I'm just going to call this board here.
I'm going to say S.A.C. or discard and here basically ready for this.
I have to excuse my personal loans.
I'm going to say personal loan.
So this is exactly my condition.
And now basically here I'm going to see close to zero.
So this exactly is the filter.
And now I have to pass this filtering mediator fame.
So this will give me my entire data.
And now on this data form, basically I have to excuse my income column, so I have to exit this income
column.
And if you are going to execute it now, you will see this exactly is a distribution of those customers,
their personal loan equal to zero.
It means they are not going to avail for the loan.
Similarly, let's say I want distribution of those customers that are going to avail for the loan.
So here I'm just going to copy paste in here.
I'm just going to do some modifications over here.
So if you are going to execute it, you will see the distributions are.
We do have some mismatch, so in such case, what you guys can do, let's say I'm going to sign over
here as histogram equals to Thors, similarly over here, I'm going to say histogram equals to that.
So if, again, you are going to execute it now, you will see this type of distribution.
Let's say I'm also going to assign some level because it is a little bit tricky if you are going to
influence some from this result.
So for the foreseeable value, I am going to assign some label and label.
I'm going to say income with no personal income, with no personal loan.
And in this case, I have to assign basically label as income with personal.
So this exactly is a label for this one.
So now what do you have to do to assign your labels?
You have to just call your BLT dot and function from your plant.
So this exactly is that.
So now you will see the labels are in the middle of the.
So let's say I'm going to set my own window.
So for this, I'm basically going to call this bill or figure.
And in this basically I have to set my own phagocytes.
So here I'm going to say, let's say to my end.
So if you are going to execute it now, you will see this beautiful result.
So basically, this blue distribution represent the income of those customers, which did not avail
for lone purpose.
And this is exactly the distribution of those which have a will for the loan.
So here you can in Frances.
Yeah.
Customers who have agreed personal loan seems to have higher income than those who didn't avail for
the Boston.
And that's how exactly you can influence from your results.
So let's move ahead to the next one problem statement in which you have to automate your analysis.
What exactly is the analysis that you have done over here by simply writing this code?
Now you have to automate all these stuff.
So what you guys can do, you can simply copy this entire blocks of code.
Let's say for this, I have to create a new function, let's say name as plot to just be stored here.
And now you have to simply paste it here and provide the right indentation because Python works on indentation.
So now here I'm going to say the very first is my colon one.
So exactly.
This is exactly let's say I'm going to name this income as colon one, right in the column one.
So this is also my column one, and now my personal loan becomes column two.
So here I have to say this is my column too, and this exactly is also my column too.
So I have done all this data.
Now, in case of label, I have to also do some modification.
So here I'm going to say whatever label I'm going to pass in my function that will get received when
I'm going to call my function.
So here in label, I have to just say label one.
And here in case of label, I have to say just label two.
And in case, if you have to assign some titles so you can see or title and let's say some assign some
title.
So of course that will get deceived by your function.
So just execute it.
And now to get your visa, you have to basically call these functions that you have written over here.
So for this, you have to say just call a function plot.
And now the very first one parameter, basically my income and the next one parameter is basically my
personal loan.
So this is my second parameter.
And the third one parameter is basically your label.
So if you are going to press shift plus tab, you will see this exactly as all the parameters that the
function will receive because you have defined this function in such a way.
So the third one is basically one label one.
So this is exactly level one you can copy from here or you can manually type over there as well.
So this exactly is my first label and my second label is basically income with both.
So this exactly is my second Lupul, let's say, if you have to assign some of the titles.
So in such case, you can assign, let's say, distribution of income.
So I'm going to say income distribution.
So just execute using oil, plus enter and congratulations.
You have got your beautiful with what you have had before.
So that's a pretty good way.
How exactly you can automate the analysis by just writing this blocks of code, by just writing this
blog function, by just calling this single function.
You have got your beautiful results in a similar way.
You can call this function multiple times depending upon what are the different different independent
variables you have in your data.
Let's say, again, you have to call this function in case of, let's say, credit card average.
So if you are going to say here you have where I have this Sethe Abeed you feature basically.
So here I'm just going to paste all the code and this time I'm going to see my income is not over there
because I have to do analysis on a basis of security.
The key, a reality, which is basically my credit card average.
And now the second one is basically my personal loan.
And this time this is exactly my credit card average here.
So here I'm going to see credit card average.
And here also I have to rhenium as credit card average with personal loan.
And this time this is exactly credit card average distribution.
So if you are going to execute it now, you will see this type of beautiful distribution.
Now you will see the importance of automation, how exactly you can get your beautiful bisel by just
writing some features in this blog function rather than writing all these blocks of code again and again.
So if you have two in friends from this visa, you will see distribution in case of with no personal
loan.
So it is a little bit having some skewness and of course little Skewness in case of normal distribution.
Similarly, in case of this one where I have a credit card with personal loan, it means person with
credit card, average with personal loan will basically travel to this orange color distribution.
Similarly, you guys can copy this code again.
Let's say I have to again call this function for different features as well.
Let's say in case of Martje get so here I have to simply write this feature name as mortgage and here
I have to see mortgage of customers with no personal loan.
So here I am going to see very first, just remove this.
And here, let's say I'm going to see more mortgage of customers with no personal loans.
And copy this and let's say you have to deal with as well.
So market of customers with personal loan, let's say you have to assign some title.
So here I'm going to say mortgage of customers distribution.
So just execute it and you will get this type of distribution for mortgage of customers with no personal
loan and having a personal loan.
So if you have two friends from this visa, you can say pupal with high mortgage value or you can say
more than four hundred k have a well, personal loan.
So that's a type of influence how exactly you can fetch from your visa.
So that's the power of automation.
How exactly you can automate the analysis in a similar way.
You can automate all that analysis by just writing these blocks of code and function in classes that
exactly how Poinar how exactly floridly and all those advanced library works.
So hope you like the session.
Thank you.
Have a nice day.
Keep learning.
Keep going.
Keep motivating.