Orgasmed welcome back to early class, of course, about the complete introduction to data science.
So until now, we talked about many things and we talked as well about numbers.
So until now, you guys should have your tram terminal ready with no beat installed on it.
So basically having access to all nonpeak functions and features.
So into these tests, we are going to learn some basic Namba operations in this class as well as in
the next class.
And we are going to talk about some number of functions, but more in the next class.
And this class is just an introduction.
So we are going to learn some basic operations.
So basically, as I said, we are going to learn some basic operations that we can do with numbers.
So you guys will have a little introduction to it and you're going to see it's not that hard to understand.
It's basically like python programming just with more features.
So the first thing that we want to do to have access to those functions is pretty simple.
We will import our well, import our number, the functions.
So, as always, will write down import as us and B or as anything we want.
And the first thing that we want to do is create ourselves.
And so basically all those operations work with Herries so well operations that we are going to learn
today.
So basically those operations will tell us many things.
So, for example, the number of dimensions inside of area, the size of an area, the shape of the
area and many other things.
So let's start basically the first thing that we want to do is create ourselves a variable.
So let's create a variable and call it R one.
In this case, and the other one will be equal to what exactly?
So just create yourselves an area so the area could be anything you want.
So don't forget and be that area.
And from this moment, you want to create yourselves, and so it's it's going to be two for six for
the purpose of this example.
So with the knowledge that you guys have about IRI's, you should know that this is one dimensional
area.
All right.
So basically, what we want to do right now is just bring this area to see that everything works perfectly.
So we will print our area.
One, if we run our little bottom up, as you can see, it's going to be two, four, six.
So everything works fine.
Everything is pretty awesome right now.
The first thing that we will learn to do is learning what is the item size of each element of our area.
So basically learning, learning to know what is the item size of each of those numbers in bytes, of
course.
So pretty simple.
You will simply write down print veidt or one dot item size.
So basically this is a simple function where a formula that will allow you to know what is the item
size of each element right here.
So in this case, it's for no matter what number you write down, it's going to be four.
So well, for small numbers, if you write down bigger numbers, maybe it's going to change.
So in this case, it's still four.
All right.
So this would be the first operation that we are going to learn.
The second one the second one that we are going to talk about would be an operation that will allow
us to know what is the data type of the elements that are inside of our area.
And basically how this works is pretty much the same way.
So it's going to be the end function.
So the first thing you need is your area.
Then you print the name of your area, dot detec.
So very important detail.
And if you run the app, you will see that E.A. 32 is the data type of elements that are inside of our
iris right here inside of this area right here.
So those are the two first operations that we are going to look at.
Next one that we will talk about is an operation that will allow us to know how many dimensions there
is inside of our area.
So in this case, as we all know, this is a one dimensional area.
So if we want to know the number of dimensions, it's pretty simple.
We will do the exact same thing.
We will just write down.
And then and if we run the app, as you can see, it's going to be one for the purpose of this example.
Let's just add another line of code that will print out as well.
So if we run our app, we will have our one dimensional area right here and we'll have one right here.
Now, let's say we want to add another dimension to our area.
So pretty simple.
What we'll do is we'll simply add some parenthesis.
And we will just copy our line of code.
And put it right here, so let's say you want to change it just to make it a bit more fancy and a tree
right here and a five right there.
So we have a number and even numbers, if we're up, as you can see, changed.
It became a two dimensional area.
So we have a little two right here.
And even if we add some other some other lines right here.
So it's still going to stay a two dimensional, as you can see there.
All right.
So this is for the tree first.
For the next thing that we are going to talk about is how to find out the size of a certain area.
So in this case, it's pretty simple.
What we want to do is let's just keep it a two dimensional area with just two lines and three columns
with the two columns and three rusada.
So pretty simple.
What we'll do right now is simply try to know what is the size of this area.
And basically what we'll do is we'll simply write down our variable dot size.
And if we run the map, as you can see, the size of this area would be six elements, since we have
six elements right here.
If once again, we add some more elements, so we add some other lines.
So it's going to change.
It's going to be 12 in this case because we have 12.
And if we make it a bit smaller, as you can see right here, we will have nine of them.
All right.
So basically, those are pretty simple.
As you can see, the next function that we are going to talk about will tell us what is the shape of
the area.
So in other words, how many columns and how many rules there is inside of our area.
So basically right now, if we just delete well, right now we have three columns, rows.
It's pretty simple.
But in this case, right here, we will have two columns and three rows.
So if we decide to run our up, what we'll do is pretty simple.
We'll just go here and write down the one that shape.
And if we run it, as you can see, we have right here two columns and three rows.
So basically one column is the thing right here.
So one, two and three rows.
So one, two and three.
So pretty simple to understand.
All right.
So next thing that we are going to learn is how to reshape our area.
So let's say in this case, we have two we have two columns and three rows in the next one in the next
function will learn to do is how to transform this function into a function that has, well, how we
can transform this area that has two columns, entry into an area that has three columns and two rows,
because, yes, it's possible to do it.
So what exactly we want to do is pretty simple.
So we will write down another line of code right here.
We'll write down one.
So in this case, it's our viable one and we want to do is one to reshape it.
So we will write down the name of our variable again, dot reshape.
So the name of this operation would be to reshape and then we open up our parenthesis and how many columns
we want.
In this case, we want three columns and two rows.
So what we'll do right now, we'll just run our up.
And as you can see, it changed right now.
So basically we have the exact same area just this time with three columns entry.
Basically, you can create another area.
Well, with this with this area right here, you can have another area that has, for example, tree
columns and three rows.
If you do it, you'll see it's going to be an area.
So if you try it out and you try to run it, as you can see, it's going to be an area because it doesn't
make sense.
So you can transform two, three columns and twos into two columns and rows.
It's possible, but it's not possible to like, create weird things like, for example, and then valley
of columns and infinity of.
So that's just basic logic.
So until now, you guys have learned plenty of basic operations.
So the first thing we talked about, the item size, we talked about the details that allow us to know
the type of data that we have.
We talked about the end of the operation to allow us to know what is the number of dimensions inside
of our area.
We talked as well about the shape and the reshape function well, shape and reshape function that allow
us to know well, to know what is the shape of the area and for the Reshad function that allow us to
reshape our function, how we want it to basically transform columns into rows and rows into columns.
So until now, you guys can see it's not that hard to understand.
Those are really the basics with Python.
So how to use Python?
Those are the basic operations.
So in the next few classes, we are still going to talk about some some other operations and some other
functions that are pretty cool and some other cool stuff that you can do with them.
So that's it for this class, guys, and see you all in our next class.