Halaal, before going ahead into the session, let's have a quick recap of what we all have until now
from data importing to data preprocessing, doing lots of analysis and doing lots of cleaning.
And these all are meaningful inside this group that this box.
What exactly is a trend?
Or I can see what is a trend of the room prices per night or the year.
And this is a departure that we have find.
And this is a relationship which is exactly in the form of a pivot table.
So we have performed all this analysis on data.
So intersession we have this assignment.
The very first part of the statement is how long do people prefer to stay at the hotel?
You have to analyze this policy statement and at the end you have to come up with some visa.
You have to come up with some insight.
So I'm just going to say, let's see if I'm going to check what exactly is a preview of.
And you will see this is my entire data, but you need some clean data because in this data, you have
your valid booking as well as some cancel booking, but you just need your valid bookings to perform
your analysis.
So I'm going to say data.
All let's say is underscore cancel equally close to zero.
And let's say I'm going to say this is my fault.
What I have to do, I have to just pass this filter in my data frame and let's say I have to store this
in my data.
Assume that's a digital frame is nothing but my clean underscore data that just executed.
And if I am going to call my head over there now, you will also.
This is the data frame that you have to consider for your analysis.
Let's say in this data frame, I'm going to create a new column.
You will see here you have a column as it stays in the Cannex and it stays in weeknight, let's say
here I'm going to say clean underscore data.
All this is stays.
Let me say that it stays in we can night and I have to do some summation or here's four that I have
to use this operator after it.
I'm going to say this is nothing but my staes underscore this week nights.
Let's say very first I have to define some data frame.
So I'm just going to say clean Alesco data of total nights.
It is not total of special request.
You have to define that column, so you have to just remove this.
And here you have to say it is my total underscore nights.
It's all up to you, whatever you want to create.
And after it, what I'm going to do, I'm just going to execute it.
And this is that warning.
Just ignore this warning.
This warning makes no sense at all because it just may be due to some anakonda issues or maybe some
liability issues.
And if you want to ignore this morning, you guys can import your warning module.
And in this warning.
So I would say from this warning, I have something which is known as I think of my filter warning.
I have to import this filter warning.
And in this filter warning, you have to say whatever warning that will come across your cell.
You have to just ignore all this warning.
So you have to just follow this, ignore here.
Now all this stuff gets executed.
And again, if you are going to again execute this now, you will see all your warning that disappeared
after it.
What we have to do, let's say I'm just going to say my cleaner's code DataDot had over there.
Now you will observe over here a new column has been created, which is exactly my total on it.
It is just because of these blocks of code that you have written over here.
And let's say in this data frame, I need a count here with respect to different different total light.
What exactly the count so far?
This what I have to do, I have to call our group by.
So I'm going to say clean the school data dot group by.
And basically I have to call this group by on the basis of very first this total.
Right.
So here very first, I have to pass this to the line.
So I'm going to say to nothing, but my daughter lives after it.
What I have to do, I have to say it is exactly my hotel and I will do all this stuff.
Then I have to aggregate something, let's say in this application I'm just going to call my counter
operation.
So just like you did, you will get all these text over here with respect to different, different or
the light and all your different different types of city hotel or resort hotel.
You all have some kind of stacks over here.
Let's say I have to convert.
Into some data.
So for this, I'm just going to call my reset and the score index over here, and this is that data
frame.
Now, let's say I'm going to store it somewhere else.
Let's say store it in ystem.
And after it, let's see what I'm going to do.
Let's say in this estate, I just need three columns for this.
I have to call this I log in next location.
And in this index location, I'm going to say I need my all the rules.
And column wise, I am going to say I need zeroth index, false index and second index all the time,
which says zero to three because three is excluded over here.
So I have to store it somewhere else.
So I'm going to say do nothing but my state.
And on this day, I'm just going to call this had or they are just executed.
And this is that beautiful texts, meaningful steps that you need, but still but still there is a hackle.
Did you have to rename your column name?
So you have to rename this.
This is cancel to let's say some number of it says.
So here I am going to say is t dot rename.
You have a function for this and here you have to say columns and here you have to pass a dictionary
and here it is.
Nothing but mine is cancer.
I have to rename it to basically number of is stays number of the states.
Now what I have to do, I have to store it in let's say it's ten so just execute it.
Now if again I'm going to call my head over here, you will see all of this stuff gets modified and
manipulated over here.
Now you just need some proper visual to represent this data frame to represent this data.
So for this what I am going to do, I'm just going to say asanas dot dot plot over there and basically
on x axis, I have to just pass this feature over.
I have to just pass this one.
Then I'm going to say on y axis, I have to pass this number of estates, which is exactly this one.
And I have to pass this number of this test.
And let's say I have to assign some parameter.
It means on what basis I have to split my back plot.
So in this WHU, I'm going to say I have to assign this one hand, if you will press shiftless over
here, you will get the documentation of this function.
Here you have a parameter, which is exactly how you order.
So let's say my you order is nothing.
But let's say very first I need my city hotel.
So I'm going to say do nothing but my city underscore hotel after it.
Let's say I just need my resort hotel.
So I'm going to say it is nothing but my resort hotel.
Make sure you don't have this underscore or they're in a similar way.
You have to provide this in quotes as well.
And similarly over here and after that you have to provide your data.
So in this data frame, I'm going to say my data of nothing but just a step and just execute it and
you will get your beautiful Barbot or whatever.
But still, it looks some complex over here.
So for this what you guys can do, you guys can.
Let's just play with your window side.
So I'm going to say VLT dot figure.
And here you have a parameter, which is my fixie.
And your phagocytes will be.
Exactly.
It's all up to you.
Whatever witnesses you want.
Next, I want the witness age of 20 Crossett.
So just executed.
So this is exactly the plot that we need.
You will observe over here.
This this blue this blue bar with respect to City Hotel, where is this orange is exactly with respect
to your resort hotel.
And you will see whenever you have this total number of 93, your city hotel is going to, then it means
there are more number of people who are going to Baffler to stay in this in this city hotel, having
that much number of nights.
So that's the type of conclusion you can get from data.
Since the second statement, we have to analyze what is exactly why bookings by my market segment.
So here, let's say in this clean underscore data, if I'm going to call my column here, you have a
column name as a market underscore segment, which is exactly this one.
So let's see what I'm going to do.
I'm just going.
To say this clean underscore data, all this one dot value underscore code to get a count of each and
every category available inside this market segment, you will observe over here.
This online has the highest count available over here.
So let's say I have to represent the state in the form of pie charts.
So for this, I'm just going to say be stopped by.
Either you can you do the math or what?
It's all up to you.
And in this pie, I'm going to say my data frame is nothing but my Penasco data and my values will be
nothing but just this one, because this will exactly be my values.
So here I am going to say this will determine my values.
And after it, I have a named parameter in this name.
I just need my name to access names.
You have to call this index order after it, you have to assign some title.
So I'm going to say my title is nothing, but let's say Bookings per Marcato segment, bookings per
market segment.
And what you have to do, let's say I'm just going to execute it now.
You will see this is that beautiful stats that you exactly need.
You will observe, hear this already is going to dominate on each and every category of market segment.
And almost almost 50 percent, almost 50 percent of the bookings are going to be fulfilled in this online
rate.
So that's the type of analysis, that type of conclusion and inferences you can fact from this Veysel
annual data.
So that's all about the session.
Hope you love the session very much.
Thank you.
How nice to keep learning.
Keep growing.
Keep practicing.