Halaal, before we dive into this session, let's have a quick recap of what we all have done in all
our previous session since the last session we have analyzed.
This is exactly my trend for the room price per night for resort as well as for city hotels.
And we have performed lots of analysis on data, which is exactly this box.
We with nothing but my distribution of price of different different room categories with respect to
my resort hotel as well as with respect to my city hotel.
And we have this beautiful coral map as well and this beautiful pie chart as well.
So in this session, what we have to do, we have this assignment.
And the very first problem statement is we have to analyze a special request done by the customers.
So let's hear let's see what I'm going to do over here.
Let's say very first, I just need an overview of the frame, how exactly my data looks like.
So I'm going to say nothing but just DataDot Haddo just executed.
And this is exactly my data frame that I need.
Now, what I am going to do, I'm just going to count the different different categories that exactly
occurs in total number of special request for this.
What I'm going to do, I'm just going to call this counterpart function.
And here I have to just say data of total, which is exactly total underscore.
You can press that as well.
And this is exactly that feature that you need.
And if you are going to execute it now, you will see this beautiful count plot over here.
You will see five or has a list count, whereas the zero zero has the highest count.
It means most of the customers are not going to give me some special request.
Or you can say almost 50 percent of the bookings do not have any special request.
So this is exactly that conclusion from this veto.
So let's go ahead with our second problem, a statement in which we have to create a pivot table of
our relationship between what exactly the relationship between this special request and this cancellation
of the bookings.
So what I'm going to do very first, let's hear let's say what I am going to do over here.
I'm just going to say very first, I have to group my data on the basis of total number of especially
good so far.
This what I'm going to do, say I'm just going to check what definition columns you will see.
These are all my different different columns.
Now I'm just going to say data grabby.
And here very first, I have to group my data on the basis of this total of special requests.
I'm just going to copy paste.
It's nothing fancy after it.
I have to group my data again on the basis of this is cancel the feature here.
I have to just pasted after it what I have to do.
I have to aggregated for this.
I'm going to say dot org and here whatever you have to pass, you have to pass in the form of dictionary.
So I'm going to say here is my dictionary.
So now what you need you need are what are my total number of customers, total number of customers
that has this that has this zero special request that has this one number of special request with respect
to this cancellation as well.
So here I'm going to say let me let me just copy this.
Let me just copy this and let me just based order.
So on this, I have to basically call my column function.
So here I'm going to say I have to just discount that said, if I'm going to execute it.
Now, you see, this is a beautiful estates with respect to all of the things you will see when your
total number of requests this month and why that is just cancel or not, then you have this much.
Let's say let's say I have to create a pivot table of this.
So what I'm going to do, I'm just going to select the very first I have to rename my column names.
I have to rename my column names from this total of a special request to LATISM count.
So for this, I'm going to say I have to just call this rhenium function, which is exactly in my PARNAS
module.
And here I have to say I have to pass my date in the form dictionary and I have to say a total of a
special request.
And after it you have to rename this.
Let's say you have to rename it to my second column, whatever you want, whatever column name you want
to assign, it's all up to you after what I'm going to do, like say I'm going to say I have to store
all these things.
So very first, I'm just going to say on this, I'm just going to call my honor stack over there to
convert.
All these trials in some type of pure, David, so just execute the sale and this is that beautiful
steps that you exactly need that you will see over here, you will see over here with respect to that
much number of customers.
You have that much count who has this canceled booking.
And this is those customers who did not have canceled booking and they did not give any special request
to hotel staff.
So this is exactly my relationship.
What I need.
Let's say I have to plot this data.
So I'm going to say I have to store it somewhere else.
I'm just going to store it and let it be looked.
And if you are going to print your paper, you can print it as well after it.
What I am going to do, I'm just going to say pivot, dot plot.
And here I have a parameter which is exactly my kind parameter.
And in this kind parameter I am going to say I just need my bar plot.
So here you have to say just execute it.
And this is that beautiful bar plot that you exactly need with respect to all these different, different
special request and whether your booking is canceled or not.
So this is that visual that you need.
And from this visa, you can say it is just my relationship between my special request and my cancellation
booking status.
And you will observe over here almost half of the bookings without any special request have been canceled.
And and in that half of them, almost another half of them have not been canceled.
So that's a conclusion.
That's a meaningful insight that you can get from this visual as well as from the stakeout.
Hope you love the session.
Thank you.
How nice to keep learning.
Keep growing.
Keep practicing.