Hello and welcome to this tutorial.
In this one we're going to learn how to import the data set.
Okay so here I am on R.
And as for Python we need to set the working directory.
So to do this we have to go to files here.
Here I'm on my desktop.
So let's go to our folder data pre-processing part one.
Here it is section two.
And this is the right folder that contains the data set data dot CSV.
So this is the folder that you want to choose to set as working directory.
And now to set this working directory on all you need to do one more thing.
You need to click on this more button here and click on set as Working directory.
And here it is.
Now we know that this is the right working directory.
And we are ready to start importing the data set.
Okay.
So to do this in R what we need to do is very simple.
We will just need one line of code.
So as in Python we're going to call it data set.
So that's the variable that will be the data set itself.
And now to import it data set is very easy.
You need to type read dot csv.
And then in parenthesis you just type the name of your data set in quotes.
So here you have to type data dot CSV.
And that's it. That's all you need to do.
So now we're going to select this line of code and execute.
Okay.
So let's have a look at our data set.
To do this you just need to click here on the data set.
And it just displays here.
Okay so we have our four columns country age
salary purchased and our ten observations.
And what's interesting to see here is that unlike
Python indexes don't start at zero but at one.
So that's why the first observation started one here and added ten.
So that's the second distinction you have to understand between Python and R.
Of course you don't have to program on both.
You can choose the one you prefer,
but if you want to program on both, as I usually do.
It's good to have this distinction in mind.
Okay, so we have our data set.
It's all fine.
And as I just said here, we don't have to make the distinction
between a matrix of features and a dependent variable vector.
And this will make perfect sense for you as we go along with this.
Part one Data pre-processing.
You'll perfectly understand why in the next tutorials.
Okay, so that's it for, importing the data
set step of the data pre-processing phase.
So that's it for this tutorial.
I look forward to seeing you in the next one,
which will be to learn how to take care of missing data,
because sometimes your data set will contain missing data.
And you have to take care of this.
And that's what we're going to learn in the next tutorial.
So I look forward to seeing you there.
And until then, enjoy machine learning.