Hello, in the previous session, we all have performed lots of analysis on our data from important
data, are doing lots of analysis, you do completely module.
We have solved a complex problem statement.
And in this session we have this two problem statement.
The very first one, we have to analyze which base number gets popular by Montani.
It means I have to group my data on the basis of base number and one as well.
So let me show you what exactly is a data frame here.
So this is exactly why data frame.
So on this what I have to do, I have two very first group it on the basis of base.
After that, I have to group it on the basis of month.
So I'm just going to say D.F. Dot group by.
And here I have to say very first I had a group on the basis of base, then after I had a group on the
basis of one that said once I have all this stuff, I have to simply access this data over here.
And whatever the time I have over here on this, I have to simply perform this count operation that
it just executed.
It will take some couple of seconds and it will return to some beautiful stats you will see with respect
to this.
With no having this this month.
You have this this values.
Let's say I have to create its data form so far that I'm just going to call this reset on this index
over here.
And after doing this, I have to store it somewhere else.
So this is exactly my base data frame.
And after it, I have to just print money as it just get executed and it will definitely return as this
beautiful little phrase.
Now you will see this back to each and every base number.
You have some kind of values that let's say what I'm going to do.
I have to simply visualize which base number gets popular by month name.
So for this, I'm just going to use my line plot that you can use your Lindberg's on Gartley.
Either you can use from Metalocalypse, either you can use on Seabourne.
It's all up to you.
So let me use Likert from Seimone.
So I'm going to say as an dot line plot and just shift Gustav and all your costs about Iapetus in front
of you.
So here are the very first on X axis.
I just need my mind and definitely on Y axis.
I just want my count, which is exactly my time.
Once I have all the stuff, let's say I have to split my line plot on the basis of base.
So I'm going to say on the basis of base, I have to split it.
Then I have to measure what exactly mine it are famous.
So my data frame is exactly my base.
I have to customize my fit because the thought is I have to set my own trigger site.
So I am going to split dot figure and here I have to set my own finger side like the size of Stankonia
six, whatever side you want, just executed.
It will take some couple of seconds, but now you will see where here this is with respect to each and
every piece number and this green line.
You can definitely come up with this cantus and yeah, this base number, which is exactly be zero to
six and seven, gets popular bi monthly.
That's a type of conclusion you can fetch from this visit.
So let's go ahead with our next problem, a statement in which you have to perform cross analysis using
your heat map.
And if you guys are not that much of it, what exactly is a heat map?
So heat map is advance level of radiation, which definitely uses my data or my magic.
And wherever the value of that particular data add, that particular index will be high and heat map
will rate on that particular index as a higher density.
That's what my heat map will do.
So here what I am going to do, I'm just going to where it goes.
I have to define some functions.
So let me check.
What exactly is the problem statement?
The very first one.
Yeah, the very first one.
I have to perform a heat map between this hour and then it means I have to group my data on the basis
of this week and hour.
So for this what you guys can do very us, I'm just going to say dot gloopy and here I have to group
my data on the basis of the day.
After that, I have to group my data on the basis of this hour.
Once I have all this stuff, let's say very first I have defined some functions.
I'm just going to define a function using that keyword.
And here my function name is like, say, count on the school rules that count my number of rules.
And here.
It will exactly receive some barometer and on the basis of barometer here, I'm going to say just return
land.
So here I'm going to say return land of whatever parameter in this function will receive.
So here I'm going to say it is my rules.
So this function, this does so now I have just executed and now here I have to just apply this count
and a squirrel's function.
So don't apply, count, underscore.
So this is exactly my function name.
So if I'm going to execute it, it will fit into some values order.
And here you will see this is my day.
This is our and here I have some values.
It means having this week and having this hour.
I have that much number of count.
Let's say I have to store it somewhere else.
Let's say I'm going to say it is exactly my let's say because whatever name you want to assign, it's
all up to you.
So this is exactly my Bycroft.
And after it, I'm also going to print it.
That's it.
That's OK.
And after what I have to do, let's say I have to create it's pivot table.
So far this what I'm going to do, whatever, because I have on this, I am basically going to call
this stack operation that said it will convert it into my pivot table.
So I'm just going to store it in, say, pivot and eat.
Exactly.
Let's say I have to print might be so just executed.
And this is a beautiful pivot table where you have your data in the form of here you have all the indexes
here, your Vectibix indexes and our become columns.
And if, let's say in this in this matrix or in this data, let's say if you have to come up with some
conclusion on what we did and on what our your rights or maximum are, you have a maximum count.
So it is hard to visualize from this huge chunk of data.
So in such scenarios, in such scenarios, your heat map is going to be pineal over here so that if
you have to use your heat map here, here, I'm going to say S.A.S. dot heat map.
And here you have to just mention your field.
So I'm just going to mention my pivot and two.
And if I'm going to execute it, let me execute and let me show you a thing.
Now you'll see over here, this is your favorite table, but still it doesn't look that much user-friendly.
So you have to just customize it for this.
Let's say I'm going to say blt dot figger and here I have a parameter which is fixit, let's say my
figures.
I just again executed and now up to some greater extent it is somehow very good.
And from this heat map you will see this is exactly what color bar and you will visualize over here
in this almost in this evening time, almost in each and every day you have a rush.
So that's a type of entrance you can easily fetch from this heat map.
But you can't find this in friends from this Beattyville.
So whenever you have a huge chunk of data at the time, your heat map is going to be final order almost
in 90 percent of cases, even machine learning as well.
So here what I'm going to do let's see here.
My problem statement was I have to perform this heat map for our day and for a month and day and from
month and week as well.
So let's say I have to perform a similar operation and again and again.
So why not try to just create a function?
Because whenever you have to perform certain tasks again and again, the best way is to create a function
over there so that if I have to define some function, let's say that function name is nothing, but
let's say function, name is heightmap.
So I'm just going to define some function and it will assume some parameters.
I can define it later.
So very first, I just need I just need some people.
David, so let me just copy this code over here, which is exactly this one.
And this is exactly code that I have copied and I have to do it here.
Here.
I have to just do some modification here.
I'm going to say I have to see my very first column, but then I have column two and here I have to
just set the set here, my column one here, my column two.
After doing all these things, what I am going to do, I have to convert it into some B whatever for
this.
Either you can type manually or you can do copy paste.
That's all up to you.
So I have to just copy paste or they are just copy, just be so in disfavoured.
You have your periodic table.
After doing all these things, you have to just visualize your.
That said, and here I'm just going to paste, and here you have to provide proper indentation, otherwise
it will give us some added.
And what I have to do, I have to simply return this heat map and warns if I'm going to execute it.
Now, our problem is statement was I have to perform it for our.
And so for this what I'm going to do, I'm just going to call this our heat map function, which is
exactly this heat map.
And here my very first parameter.
Exactly the second parameter is exactly what that said, just executed.
It will take some couple of seconds and it will return as my beautiful heat map in a while.
And now you will figure out this is a beautiful heat map here.
And from this beautiful heat map, you can definitely come up with a conclusion.
Yeah.
In each and every evening, almost in each and every day, you have certain kind of rush, whereas whereas
in this midnight you don't have any kind of rush.
Because I have I had this little bar over here and depending upon this color bar, I can definitely
come up with some conclusion in a similar way.
You can perform both the problem statement by just passing parameter.
That's a very piece of cake lighting.
So that is exactly the assignment.
And you have to infer from this as well that it's not like that.
You have to just pass this parameter and that's okay.
You have to infer from this heat map as well, because if you're confused, because if your visual isn't
going to conclude anything, then it makes no sense for analysis.
So that's all about this session of the session very much.
Thank you.
Have a nice day.
Keep learning.
Keep going.
Keep practicing.