Hello and welcome to the very first session of this flight fair prediction project, in which we have
to predict what exactly can be the fear of the triggers, depending upon all the other features in our
data as well.
So we will gradually start from data importing, data cleaning.
Then we have to perform data processing on our data.
After doing all the stuff, we have to perform lots of analysis of our data to understand our data as
much as we can.
So I'm just going to open my chapter notebook where I'm going to code in Python programming language.
So this is exactly that ID where I'm going to code in Python program so that if I'm going to import
some basic libraries, all the necessary libraries and all the necessary modules, that will be highly
helpful for us to do all the manipulation task, poor data, all the lots of analysis, to do all the
modeling tasks, whatever we have to do so very fast.
I'm just going to import my very first module, which is exactly fundus module, and I'm going to create
a speedy.
So PARNAS is extensively used in case of data manipulation data analysis.
Let's say you have to extract data from some GSV into your data frame.
So in such case, by that will be your pioneer.
So now for your Nomaka competition, you guys can import your nonfamily and I will create this and people
and for Visitacion purpose, you guys can import the very first module.
I'm going to import as as as s so I'm going to test imported and let's say for atomisation task us and
also import this matplotlib, the Jazmyne and the Resolution Library.
So I'm just going to execute it using Autobus enter and all the stuff gets executed over here.
So now we have to read our data, which is exactly available over here, which is in my data on the
screen.
So we have to read this data before performing any sort of analysis on your data.
So I'm just going to read this data and we will observe over here.
This is exactly my data is in the Excel format.
You would observe over here.
So for this, we have to call a function, which is exactly my read Underscore Excel, which is exactly
this one.
And here very first, we have to mention where exactly my data is available.
So I'm just going to copy this entire path from here and I'm just going to paste over here.
And after it, if you will press tab over here, you will get all your stuff available at this particular
spot.
So we have to basically read this file.
Let's say I'm going to store its data frame object in, let's say, a create on this whole data.
So basically, I'm going to execute it and lets it to get a preview of data frame you guys can call
basically had on your dataset.
So I'm just going to call had and this is exactly preview of your data.
How exactly you do that looks like you will see over here you have your line date of January, source
and Destination and all the other features.
And basically you have to predict what exactly can be the price depending upon all other independent
features.
So let's say if I'm going to open my assignment for the session, for the very first task is we have
to deal with all the missing values that are available in data.
So let's say I'm going to call what are the missing values available in data?
How many missing values are available and data.
So far, this you guys can call is any.
And if you will call someone there, you get all the information.
Author Missing values available in your data.
You will see you have just two missing values, one over there, one over here.
So basically, you guys can drop these missing values because here you have three less missing values.
So let me check what exactly the shape of this data felt.
So if I will call Chaib over there, you will see it has that much number of rows and that number of
columns in my data thing.
So I'm just going to drop whatever missing value I have in my data.
So far, this is what we can do.
We can simply drop.
And for this, we had to call a function drop any.
And here I have to pass my parameter to update my data from elsewhere.
So just executed after it.
What we have to do, let's say we do cross-check whether my missing value estimate or not to just copy
from here and just to paste over here.
And now we will observe.
We don't have any missing value in my data.
It means up to some extent my data is going to clean the let's move ahead to the next problem statement
that we have to deal with that.
So this is exactly next problem statement that we have to deal with that.
So basically we have to perform data clearing on our data to make this data ready for the analysis as
well as modeling purposes.
Because whenever you are going to work from Real World Project, you will have.
Get your clean data, you will always get your raw data, whether in the form of some fve, whether
you have to accept the data from some APIs, whether you have to extract the data from some databases,
it's all a that use case.
So whenever you are going to work on some real world scenarios, you will always get your raw data.
And you have to prepare this data.
You have to do lots of analysis.
You have to understand your skills.
You have to understand your data.
And then you have to build such a model that can do prediction depending upon what use case you have.
So let's say very first I'm going to check what exactly is a data typed of each and every variable of
each and every column available in my data.
So just call this stuff, which is my data function.
And here we will observe.
These are all the data types by default over here and we will observe this data journey by default.
Partners will assign it as object.
But we know if it is of timestamp format, it is a daytime format.
So it means we have to convert this data journey, this departure time, as well as this arrival time
as well, because these three variables are basically of data and format.
We have to convert this.
So I'm just going to define that function that can convert my all the three variables to some daytime
format.
So next time we define a function and I'm going to say its name is, let's say, change to change into
daytime.
So I'm just going to define that function that can change whatever column I'm going to pass over here.
It will convert that data type of that particular column to whatever column I'm going to pass over here.
Very first, I have to call I to underscore data and function that will convert this object data type
into some data so that if I have to exit this data frame, which is exactly in Kreen on this data and
here I have to exit this train data off column, similarly, I have to update this as well.
So I have to update this using this, this, this.
So let's say I have to just execute this function and basically whosever feature I have to convert it.
I can basically parse this column name in this function.
That's it.
So basically I have to upgrade the data journey, this departure time, as well as this arrival time.
So let's say I'm going to I create as for I n and let's say I want all the three columns.
So what I'm going to do our very first I have to exit the data frame.
And on this, if I'm going to call these columns, we will look at all the columns in the form of list.
So that is false.
And just going to, let's say, complete this one.
And here I'm going to assign a list.
And in this I'm going to Stormi all the data and these two column name as well that I have to deal with
that.
And in this loop, basically I have to access this function, which is my chain into data.
And here I have to pass this.
I just executed.
And if again that's it, I'm going to call these types of again.
Now we will observe over here these three features gets converted into daytime format just because of
this blocks of code that I have written over here.
That's it.
Now, what we have to do, let's say this is my data column, so what I'm going to do.
So whenever you are going to parse this column to your machine learning model and you will say you predict
on the basis of whatever, the entry for my machine learning model isn't able to understand what our
entry will be awarded for, what we have to do in such case.
So basically, we have to split this date and we have to tell to a machine learning model.
Yeah, this is it.
This is month.
And this is easier than only my machine learning model is able to understand.
What exactly is a date for a journey?
What is a month long journey and what does the air quality.
That's what I am going to do now.
So very first, what I have to do very first, I'm going to access many of them.
And in this I have to exit this data journey column, which is exactly this journey.
And on this, what I have to do to access your day, you have to call a door day function to access
them.
Similarly, what you have to do.
Similarly, I'm going to call this data dot month to access your month and after it, let's say whatever
month it will.
I have this stored in some variable or in some columns.
I will restore it in, let's say, a month similar leave whatever data will determine.
I'm going to store it somewhere else, let's say in some column name.
So I have to define that column as well.
So that's that column name is Jaune.
Underscore the similarly over here, let's say journey on this score month after just executed.
And if I'm going to call ahead on.
Data to get a rough idea what exactly is going in my data.
Now we will observe over here at two columns a journey day and journeyman has been added in your data
frame.
Now, what we have to do, we have to drop this data journey column because we have already first all
the necessary things from this feature.
It means we can drop this column.
So what I am going to do, I have to ask this, this and here I have to call a graph function.
And here I have to mention what I have to drop.
Then I'm going to say access to one, because I have to drop this column in a vertical way.
Then I have to say to my in-place barometer as to because I have to update mine as well.
So just executed all of the stuff get executed.
So that's all about the session in the upcoming session.
We are going to deal with this departure time as well as this arrival time feature as well.
So that next session is all about data cleaning and data preprocessing.
So hope to love the session very much.
Thank you.
Have a nice day.
Keep learning.
Keep growing.
Keep practicing.