Hi and welcome back to this birth course, so not that we have imported all of our packages.
We are ready to start coding for real.
So we will start with the data processing.
And of course, the first thing to do is to load the data into our session.
And as I said before, we will get our data from our personal Google Drive folders.
So we will use first drive that mounts.
And that means that we will get all of our Google Drive folders locally in this in this machine, in
the server.
And so we call Mount's and we want to mount.
Contents flash drive, so that means that the Google Drive that we will add in our server will be in
content flash drive.
I will show you right after this what it means.
So they ask us to click on this.
You are in order to pick the Google accounts that we want to use as a Google Drive folder.
And I will use this one.
We just have to allow everything.
And then there is a code that we need to copy in order to pass it.
He we press enter and after a few seconds we get this mounted its contents flash drive.
So that means that now if I go to files, I can see this drive that has appeared.
And if I go into it, I can see that my drive and I'll see all the things that are in my personal Google
Drive folders.
So even project I will have the and all the data and all the Google collapse for this project.
So that's it's now what we do is that we will just load these files.
So in order to do that, as I said, it's a dot C as we file and we will get pande data from out of
it.
So we will just indicate the columns that are in this file.
The first one is Sentiment's.
That's what will be our label.
So it will be a zero or a one.
Then we have the ID of the tweets we don't really care about.
That's something for the date we will have query that's not important either.
User, we don't care and finally texts and that will of course be our input.
The text we will use our input.
This is the tweets.
And so now it just creates data equals speed that we see as V and so we need first to give it the power
for the file.
So we start with flash contents, flash drive, slash my drive, then projects projects, slash birds
and sentiment data, slash train dot.
See as we actually well I already wrote it but well you can see that there is a typo here and a good
way to not have typos is to actually go through it manually.
So if I go to Berts sentimental sentiment data and here I can just copy both.
And I can just busted hey, and so I should have done this because you see that I had a typo, so that's
also a good way to do it a little bit more quickly and with less errors, of course, then we need to
specify that there is no header in the file.
So there is no line at the beginning that just indicates the columns then names equals calls.
So the names of the columns will be this.
Thing that we just created here, this lists.
Then engine equals Python.
So this line, it just indicates how we are going to read the file and actually if it don't specify
that the engine will be Python, we will get errors on these files.
So for this specific dataset, we will need to use Python as an engine.
And finally, the encoding.
So that means how this has been encoded will be Latin, one that's really standard for Western languages.
That's just the way for each letter we make it into numbers because, of course, in computers, a letter
is just a number.
And so this relations between each character, each letter and the corresponding number is specified
by this encoding.
So there are many different encoding.
You may have seen UTF or things like that.
Well, Latin one is really common for Western languages, and this is the one that has been used here.
So that's what we'll need to call and let us read the file.
And let's also correct the typo here.
And while these clouds, we will just write the next cell, which will be just to drop the unused columns
so that the drop and what we observe is the column ID then date.
Then query and finally use it, and we will drop that along the Axis one, because the axis zero corresponds
to the rose and the axis ones to the column.
So we want to get rid of those elements along the Axis one.
And finally in place equals true this way data is replaced by the new lighter version of the data said
otherwise without the in place equals to it, we would have to write data equals data that drop.
So let's just run that and that's it.
Now we have our data from let's actually write data that had five, for instance.
So we get the first five first rows and we see that we have just the sentiments and the text and that's
perfect.
That's what we wanted.
And you can see that here with all the mentions, all the links, all those things that we don't really
want to have.
For sentimental Analisa, that means that we have some data processing to do, and that's exactly the
topic of the next session.
So, Susan.