Hello and welcome to the very first session on this project.
So this is exactly the very first session and indecision.
This is our very first a statement that we have to go to.
The very first one is we have to perform data cleaning on our data and we have to prepare our data for
our modeling purposes, because whenever you have your data in real world aspect, you will never have
your clean data.
You always have your raw data.
You always have your Massada.
So you have to deal with that raw and messy data and you have to prepare that data in such a way that
you can build a cool and fancy machine learning model on top of that.
So I'm just going to open my Jupiter notebook.
I do it here and this is exactly my Jupiter notoriety, so that if I have to import some basic modules
like Banda's Numberi Matplotlib, Seabourne Plotnick for extraction, manipulation and validation as
so very first, let's say I'm just going to import my bananas and I'm going to create its speedy just
import it.
And after that I have to import my name as well.
For dramatical computations are for descriptive statistics, all the stuff that are going to cover in
my name by module after it.
We have to use our some data with the additional library.
So I'm just going to say my import matplotlib dot.
So here I'm going to say Immaculata dot plot as BLT for better representation.
You guys can also go ahead with this Seabourne.
So I'm going to import my Theban as well.
So just executed.
It will take a while and all your stuff gets successfully executed over here now ready for what you
have to do.
You have to redo it because before performing any kind of analysis, you have to prepare the data for
analysis as well as for the marketing purpose.
So I'm just going to say PD Dot and it's good to see because it is exactly my data and the final kesby
format.
So you will figure out this is exact.
My dataset, which is hotel underscore bookings, but very close to happen where exactly your data is
available.
So I'm just going to copy this entire path and I'm just going to paste over here and here.
If you will press tab, you will get all this bill will add that particular part you will get this is
exactly that data that you need to read it after data.
What I'm going to do so it will exactly that anonymized some data form object.
So I'm going to say it is exactly my idea of just executed Alexa.
I'm just going to call ahead to get a preview how exactly my data looks like.
You will see this is exactly that data on which you have to do lots of analysis, lots of people sitting
and lots of insights you have to fetch from this data.
And let me check how many rules and how many columns we have in this data so far this year.
You guys can just call shape or whatever.
So here I'm going to say D.F. dot shape executed and you will observe.
It has that much number of rules and it has that much number of columns.
Now, let me check how many missing value we have in and what he does for this.
I'm just going to say, Dot, is there any means is null value available?
Got some to do summation of all the missing values in your data.
Just execute this command and you will figure out you have that much huge number of missing values available
over here.
You will see in this country you have approx.
Five hundred in this Algerian company.
You will see how many huge number of missing values we have.
So we have to deal with these missing values.
So let me define some function over this so that we can deal with that.
So here I'm going to say let's see my function in resetting or let's say data underscore clean and what
exactly is function will receive.
And we do define it later and what this function will do.
This function will nothing.
It just will my missing values by basically zero.
So I'm just going to say to just going to fill my missing values with zero and then after it I'm going
to update them as well.
To just assign in place equals to do so here.
I'm going to say whatever data from this function will receive just to all these additions after what
we have, do I have to print something, let's say offering all the manipulations I'm going to print?
Whether I have any null value or not so far is just call.
This is an old or some old here.
Now we have to just execute this well.
And now what we have to do, we have to call this function.
So I'm going to say Daytona's correctly.
Add in this function, you will see it just receive a single parameter, which is exactly your data
frame.
So I have to just pass this D.F. over here and just execute it.
It will take a while.
And this.
Beautiful statistic, you will figure out what you don't have any missing value in your data.
That is exactly what we want.
But still, you have to do a lot of people sitting on your data.
It's very first, if I'm going to call these columns over there, you will see all your columns available
over here.
So in this all these columns, you will figure out these addas, these children, add these babies.
So let me copy both three variables and let me create a list there.
So I'm just going to create a list.
And on this list, what exactly is my strategy over here?
So I'm just going to check how many unique values or you can say number of unique values in each and
every feature in each and every element of this list.
For this, I'm going to say for I list very first, I have to treat on each and every element.
So I'm going to save for I list.
Once I have this iteration, then I'm going to say on this I it means def of I got unique.
So what I have to do, I have to bring this here.
I'm going to say I have to print this.
So let me just add some placeholder and whatever to value this placeholder.
So it will exactly the C values from my format function.
So here I'm going to say this placeholder has unique values as again I have to add a placeholder and
the very first placeholder will get receive value from this format as whatever you have in your iteration
and the second placeholder will receive value from this deal.
I thought unique means this.
I will get shifted over here and this D.F. of IDOT Unique will get shifted over here.
That's it.
Just provide some small bracket and just execute.
Now you will figure out Addas has unique values as this.
This children has unique value as just this and all this stuff over here.
So you will figure it out over here.
It seems to have some Tertius and data because this adult and these children and these babies can't
have zero at a time because you will see here I have zero.
Here I have zero.
And here I have zero as well.
So let me create a filter over here so my filter will see nothing.
But let me just create a filter.
My future is anything but deal of children.
It goes to zero.
So this is exactly my very first filter.
So I'm going to say this is exactly my very first filter and and then I'm going to define my second
filter, like C, D of of others equally close to zero.
So this is exactly my second filter.
And you can see this is exactly my second condition of this filter.
And after that we have a third condition.
And the third condition is nothing but div of babies equal.
It goes to zero.
So this is exact, my entire filter.
So I'm going to say this is exactly my filter.
And if I'm going to pass this filter in my data frame now, you will get you some data over here.
Now you will figure out over here and if I'm going to scroll it to here so you will figure out you don't
have your all the columns.
So let me display my all the columns over here.
So far, this is what I'm going to do.
I'm just going to say B'Day Dot Saturnus corruption.
You have some inbuilt function over here and here.
I'm going to say display dot max underscore columns and here I have 32 columns, so I have to display
method to do it.
And if again, I'm just going to copy all this stuff, pasting or they're executing again, and now
you will figure out this is exactly my and our he will see here I have adult children, babies and all
these and these are zero.
But if you think logically, it is not possible that adults, children and babies at a time can be zero
simultaneously.
It means these are exactly your noise.
These are exactly you're wrong.
And three new data points.
You have to remove this.
So far, this is what I'm going to do.
I'm just going to say I just need a negation of this filter.
So for negation, you have to use this apparatus.
I'm just going to say negation of this filter.
That's it.
So if I will execute it now, you will see what here.
This is exactly that data on which you have to perform all your analysis on which you have to build
your cool and machine learning model after doing lots of feature on new data.
So let's say this is exactly my data.
So let me name this data as, let's say data.
So and if I'm going to.
I had over there and I will figure it out.
This is exactly the data set on which you have lots of people, lots of cleaning, and then you have
to build a model that's all about the session of the session very much.
You have a nice to keep learning, keep growing, keep practicing.