Halaal, before going deep dive into the session, let's have a quick recap of what we all have done
on this session since the very first session.
We have collect our data, then we have prepared our data for the analysis as well as for the morning
papers, because in one aspect you will never get to clean data.
You will always get a complex and raw data.
You have to always read your data for your machine learning, whether it's a deep learning or any kind
of project that you are working on.
So we have gone through a lot of preparation.
And after that, in the last session, we had this amazing map, which is exactly we have analyzed exactly
the home country of guest.
After it, we have analyzed what exactly is the distribution of each and every room that that's what
we have done in the previous session.
So in the in this session, we have this amazing statement.
How does the price where I put tonight or you can say how does price per night vary over the year?
You have to consider this problem statement with both the total as well as for your city hotel.
It means you need to do it often.
So very first, I'm just going to say data.
All hotel is equally close to zero.
I will say the Callicles to the very first is my resort hotel after it.
So I can say this is exactly my first condition.
And once I have this first condition, then I have to add my second condition as well.
So my second condition is nothing.
But data is underscore, cancel it, call.
It goes to zero because I just need my valid bookings.
Once I have this filter, I have to just pass this filter in my data frame so that I will have my filter
data from XM.
Just going to copy this from here.
And again, I had to just pasted this time I'm going to say here I have my city water.
So the very first data frame, let's I'm going to say this is my data underscore resort.
Once I have done all these things, the second data frame, I'm going to say this is exactly my data
on Underscore City and we have to just execute.
So these are exactly what data frame that you have to consider.
Let me show you a quick recap of how this data frame looks like.
Let's say I'm going to check a preview of data.
And as a result, you will see these are all your entries with respect to your result.
So in your statement is nothing.
But how does the price per night that I over the.
So let me check how exactly you price that I over the month, because this is exactly similar to your
problem statement so far.
This is what we have to do.
You will see here you have arrived and this could be eight in the score month column.
So you have to consider this column and you will see here you have lots of features in this and I will
netcode it in school month.
It means you have to group this feature.
You have to group your data frame on the basis of this feature.
So I'm just going to say data on this score result and I had to access basically my this and I wouldn't
have scored it on a single month or what you can do.
You have an alternative for this one.
So just call Gooby and in this group by just pass this feature.
Both are similar here.
I'm going to say after it I have to access my price.
And on this price, if I'm going to call my Maeno there, if I'm going to execute it, you will see
with respect to Apple, you had that much starts with respect to August and all these months you have
that much instead.
Now what you need, you have to convert this into some bit of frames.
I'm just going to say reset on the school index.
That's it.
This will give me my amazing little frame.
Now, let me store it somewhere else.
I'm just going to say resort and score, let's say Hot-Air.
And after it, what we have to do, let's say I'm going to print it as well, which is exactly this
one just executed.
This is that amazingly the frame that you exactly need to respect your resort hotel.
You have to follow the similar approach, the similar approach for your city model as well.
So I'm just going to say I have to let me just copy all these stuffs and let me just paste or here I
have to do similar approach or my data underscore city.
So just remove the Danisco city, just axis.
And this time I'm going to say this is nothing.
What my city on a score hotel and I have to, to my city underscore hotel as well.
So this is exactly my city hotel.
He will see with respect to the city hotel you have.
That much changed.
Now, what you have to do, you have too much both that greater frame on the basis of this arrival and
a school day a month, because in both Dataprep you have this common column name.
So for your purpose, you have to just call some inbuilt function of PARNAS.
Your function will be very handy with you.
So this time I'm just going to say resort, underscore hotel, dot lodge and you will check all the
custom parameters of this function that the unstuff barometer in this.
So you will see here you have a right.
It means what exactly is your right data frame.
So my right data frame is exactly my city hotel and this resort hotel is exactly my data frame.
And here I have one parameter which is exactly on it means on what basis you have to merge it here.
I'm going to say on this basis I have to merge it.
If I'm going to execute it, it will return this amazing stats.
Now, let's say I have to manipulate my column and select me ready for this to go somewhere else.
I'm going to say this is exactly my final.
And Vollans after restoring I'm just going to say this is exactly my final score columns is it goes
to, let's say, the very first feature I'm going to consider it is as one the second feature I'm going
to consider it is, let's say, price for resort.
The third feature, I'm going to say, does nothing but price for city hotels.
I'm going to say price for city hotel.
That's it.
And what I have to do, I have to just print this data.
I'm going to say just print this final exit.
It just execute.
This is your amazing data frame.
Still, you have to do one more preprocessing on this data frame.
Hope you all guys get to know about it.
Yeah, this is exactly that month because you will see in this month column you don't have a proper
hierarchy.
And if you are going to use your with the addition functions over here directly on this final data frame,
you will get some improper conclusion because this month column is on the proper track.
You will see April, August, December.
It makes no sense at all.
It means you have to start this month column.
So there are two ways either you can use your own logic, use your own programming skills.
But seriously, that's going very complex over here if you are going to write your own logic.
So, yeah, Python is going to be pining over the python to write to some inbuilt functionality just
to use Python functions.
And Python will do that task for you.
So for this, you have to import and you have to install it.
If you haven't installed it, you have to install it as well.
So if you haven't installed, you guys can install using PIP install, which is exactly my short python
data frame by a month or so.
This is exactly that module that will come into existence and it has some dependency packet as well.
So if you haven't installed a dependency, you have to also install it, which is exactly my pipe installed,
shorted months and weekdays.
So you have to also install it.
But very first you have to install this one after it.
You have to install this file because this is exactly our dependency packet of this one.
So if you haven't install it, you guys can simply install using this, offering all the stuff I have
to simply imported.
I'm going to say import this short underscored date frame by frame by underscore month or week.
And I'm going to create its allies as, let's say, SD just executed.
And now what we have to do, we have to execute some function short underscore data and whatever parameter
this function will receive and will define it later.
And now using this SD, I have some inbuilt function, which is exactly my sort.
Underscore data frame by month, just tab you will get all your documentation the very first what exactly
your data frame and a second one.
What exactly you're gonna.
So here I am going to say do nothing but let's say it is dissolve and whatever column name it will receive,
I'm just going to receive that thing from my own function, which is exactly short and a data.
So I'm going to say this is nothing but Mendeleev and this is nothing but my column.
Name it.
And here I have to say column name that said, I have to simply return it.
So I'm going to say just to return all this stuff executed.
Now what you have to do, you have to call this function and this time you have to use your final data
frame.
And this time what I'm going to do and just.
And to say I have changed my mind that it just executed and it will take a while and return this amazing
data for you, what you will see this month, gas shortage right now.
Next, I have to store it somewhere else, let's say.
I would say this is my final little frame that I have to consider.
So let me just print again.
And this is exactly the data frame that you need now.
What you need you need some visuals so that you can conclude from this data.
So whenever you have that type of data, whenever someone will ask what exactly the trend are, how
something is varying, it means the best approach will be just go for our line.
So I'm going to say dot line, which is exactly inbuilt function inside my mind.
You just press shiftless tab.
And these are all your custom barometer data frame, what this access is, what you want and why Y-axis
and all these different different types of things.
So here I am going to say my data frame is nothing but which is exactly my final on X-axis.
I have to just pass my month and definitely on Y-axis, I just need some column.
So let me say final dot.
Gollum's over there and you will get both these columns that you exactly need on Y-axis.
I'm just going to copy all these stuff and I'm just going to paste all these things after it.
What you have to do, you have to assign you some title as well.
So I'm going to say the title is Nothing word like, say, room by night.
Or you can assign your own title as well to room price for night over the month or the month.
That's it.
Now, what I have to do, I have to just execute the cell.
It will take a while, but it will be amazing to watch there.
You will see with respect to this one, you have that much trend, whereas with respect to your resort
hotel, you have that much like, say, I have to conclude from this line chart so I can clearly see
it.
Yeah, it clearly shows that prices in the resort hotel are much higher, are much higher during the
summer and you will see or hear the prices for the city hotel will rise very less.
And it is most expensive during basically my spring and basically my autumn column.
So that's the type of conclusion you can fetch from your date of trying to visit.
I hope you love this session very much.
Thank you.
How nice to keep learning.
Keep growing, keep practicing.