1 00:00:00,270 --> 00:00:05,590 Orgasmed welcome back to early class, of course, about the complete introduction to data science. 2 00:00:06,270 --> 00:00:10,770 So until now, we talked about many things and we talked as well about numbers. 3 00:00:10,800 --> 00:00:16,720 So until now, you guys should have your tram terminal ready with no beat installed on it. 4 00:00:16,740 --> 00:00:20,640 So basically having access to all nonpeak functions and features. 5 00:00:21,480 --> 00:00:26,880 So into these tests, we are going to learn some basic Namba operations in this class as well as in 6 00:00:26,880 --> 00:00:27,660 the next class. 7 00:00:27,670 --> 00:00:31,290 And we are going to talk about some number of functions, but more in the next class. 8 00:00:31,300 --> 00:00:32,790 And this class is just an introduction. 9 00:00:32,800 --> 00:00:34,740 So we are going to learn some basic operations. 10 00:00:36,690 --> 00:00:40,750 So basically, as I said, we are going to learn some basic operations that we can do with numbers. 11 00:00:40,770 --> 00:00:45,670 So you guys will have a little introduction to it and you're going to see it's not that hard to understand. 12 00:00:45,690 --> 00:00:48,750 It's basically like python programming just with more features. 13 00:00:49,770 --> 00:00:53,600 So the first thing that we want to do to have access to those functions is pretty simple. 14 00:00:54,360 --> 00:00:59,840 We will import our well, import our number, the functions. 15 00:01:00,660 --> 00:01:05,670 So, as always, will write down import as us and B or as anything we want. 16 00:01:07,500 --> 00:01:10,300 And the first thing that we want to do is create ourselves. 17 00:01:10,400 --> 00:01:16,890 And so basically all those operations work with Herries so well operations that we are going to learn 18 00:01:16,890 --> 00:01:17,100 today. 19 00:01:17,130 --> 00:01:19,450 So basically those operations will tell us many things. 20 00:01:19,490 --> 00:01:24,300 So, for example, the number of dimensions inside of area, the size of an area, the shape of the 21 00:01:24,300 --> 00:01:26,790 area and many other things. 22 00:01:27,300 --> 00:01:32,480 So let's start basically the first thing that we want to do is create ourselves a variable. 23 00:01:32,730 --> 00:01:36,550 So let's create a variable and call it R one. 24 00:01:36,920 --> 00:01:41,470 In this case, and the other one will be equal to what exactly? 25 00:01:41,490 --> 00:01:45,990 So just create yourselves an area so the area could be anything you want. 26 00:01:46,000 --> 00:01:48,480 So don't forget and be that area. 27 00:01:50,220 --> 00:01:55,590 And from this moment, you want to create yourselves, and so it's it's going to be two for six for 28 00:01:55,590 --> 00:01:56,840 the purpose of this example. 29 00:01:57,210 --> 00:02:02,760 So with the knowledge that you guys have about IRI's, you should know that this is one dimensional 30 00:02:02,760 --> 00:02:03,060 area. 31 00:02:04,020 --> 00:02:04,350 All right. 32 00:02:04,360 --> 00:02:11,030 So basically, what we want to do right now is just bring this area to see that everything works perfectly. 33 00:02:11,250 --> 00:02:13,020 So we will print our area. 34 00:02:14,520 --> 00:02:19,410 One, if we run our little bottom up, as you can see, it's going to be two, four, six. 35 00:02:19,420 --> 00:02:20,670 So everything works fine. 36 00:02:20,680 --> 00:02:23,100 Everything is pretty awesome right now. 37 00:02:23,110 --> 00:02:30,750 The first thing that we will learn to do is learning what is the item size of each element of our area. 38 00:02:31,710 --> 00:02:37,800 So basically learning, learning to know what is the item size of each of those numbers in bytes, of 39 00:02:37,800 --> 00:02:38,130 course. 40 00:02:38,520 --> 00:02:39,480 So pretty simple. 41 00:02:40,230 --> 00:02:45,070 You will simply write down print veidt or one dot item size. 42 00:02:45,240 --> 00:02:52,470 So basically this is a simple function where a formula that will allow you to know what is the item 43 00:02:52,470 --> 00:02:54,600 size of each element right here. 44 00:02:54,840 --> 00:02:59,130 So in this case, it's for no matter what number you write down, it's going to be four. 45 00:02:59,430 --> 00:03:03,120 So well, for small numbers, if you write down bigger numbers, maybe it's going to change. 46 00:03:03,900 --> 00:03:05,400 So in this case, it's still four. 47 00:03:05,830 --> 00:03:06,180 All right. 48 00:03:07,440 --> 00:03:10,800 So this would be the first operation that we are going to learn. 49 00:03:11,550 --> 00:03:16,440 The second one the second one that we are going to talk about would be an operation that will allow 50 00:03:16,440 --> 00:03:22,410 us to know what is the data type of the elements that are inside of our area. 51 00:03:22,560 --> 00:03:24,900 And basically how this works is pretty much the same way. 52 00:03:25,440 --> 00:03:27,750 So it's going to be the end function. 53 00:03:27,790 --> 00:03:29,570 So the first thing you need is your area. 54 00:03:29,940 --> 00:03:34,770 Then you print the name of your area, dot detec. 55 00:03:35,010 --> 00:03:36,600 So very important detail. 56 00:03:37,380 --> 00:03:46,380 And if you run the app, you will see that E.A. 32 is the data type of elements that are inside of our 57 00:03:46,380 --> 00:03:50,210 iris right here inside of this area right here. 58 00:03:50,850 --> 00:03:54,070 So those are the two first operations that we are going to look at. 59 00:03:54,160 --> 00:03:59,970 Next one that we will talk about is an operation that will allow us to know how many dimensions there 60 00:03:59,970 --> 00:04:01,680 is inside of our area. 61 00:04:02,130 --> 00:04:06,580 So in this case, as we all know, this is a one dimensional area. 62 00:04:06,720 --> 00:04:10,350 So if we want to know the number of dimensions, it's pretty simple. 63 00:04:10,350 --> 00:04:11,820 We will do the exact same thing. 64 00:04:12,270 --> 00:04:13,440 We will just write down. 65 00:04:13,770 --> 00:04:21,110 And then and if we run the app, as you can see, it's going to be one for the purpose of this example. 66 00:04:21,120 --> 00:04:25,200 Let's just add another line of code that will print out as well. 67 00:04:27,510 --> 00:04:33,120 So if we run our app, we will have our one dimensional area right here and we'll have one right here. 68 00:04:33,720 --> 00:04:37,050 Now, let's say we want to add another dimension to our area. 69 00:04:37,320 --> 00:04:38,320 So pretty simple. 70 00:04:39,480 --> 00:04:42,660 What we'll do is we'll simply add some parenthesis. 71 00:04:45,080 --> 00:04:48,590 And we will just copy our line of code. 72 00:04:49,730 --> 00:04:56,210 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 73 00:04:56,210 --> 00:04:58,450 right here and a five right there. 74 00:04:58,460 --> 00:05:02,810 So we have a number and even numbers, if we're up, as you can see, changed. 75 00:05:02,810 --> 00:05:05,380 It became a two dimensional area. 76 00:05:05,390 --> 00:05:06,980 So we have a little two right here. 77 00:05:07,280 --> 00:05:11,930 And even if we add some other some other lines right here. 78 00:05:12,740 --> 00:05:17,390 So it's still going to stay a two dimensional, as you can see there. 79 00:05:18,770 --> 00:05:19,040 All right. 80 00:05:19,050 --> 00:05:20,900 So this is for the tree first. 81 00:05:20,900 --> 00:05:28,550 For the next thing that we are going to talk about is how to find out the size of a certain area. 82 00:05:28,880 --> 00:05:30,680 So in this case, it's pretty simple. 83 00:05:30,920 --> 00:05:36,920 What we want to do is let's just keep it a two dimensional area with just two lines and three columns 84 00:05:37,790 --> 00:05:39,680 with the two columns and three rusada. 85 00:05:39,800 --> 00:05:40,630 So pretty simple. 86 00:05:40,640 --> 00:05:45,880 What we'll do right now is simply try to know what is the size of this area. 87 00:05:46,100 --> 00:05:51,590 And basically what we'll do is we'll simply write down our variable dot size. 88 00:05:52,820 --> 00:05:59,090 And if we run the map, as you can see, the size of this area would be six elements, since we have 89 00:05:59,090 --> 00:06:00,400 six elements right here. 90 00:06:00,720 --> 00:06:05,940 If once again, we add some more elements, so we add some other lines. 91 00:06:07,160 --> 00:06:08,050 So it's going to change. 92 00:06:08,060 --> 00:06:10,410 It's going to be 12 in this case because we have 12. 93 00:06:10,460 --> 00:06:17,240 And if we make it a bit smaller, as you can see right here, we will have nine of them. 94 00:06:17,780 --> 00:06:18,090 All right. 95 00:06:18,110 --> 00:06:20,000 So basically, those are pretty simple. 96 00:06:20,000 --> 00:06:26,000 As you can see, the next function that we are going to talk about will tell us what is the shape of 97 00:06:26,000 --> 00:06:26,600 the area. 98 00:06:26,960 --> 00:06:32,860 So in other words, how many columns and how many rules there is inside of our area. 99 00:06:33,290 --> 00:06:38,600 So basically right now, if we just delete well, right now we have three columns, rows. 100 00:06:38,900 --> 00:06:40,010 It's pretty simple. 101 00:06:40,790 --> 00:06:45,860 But in this case, right here, we will have two columns and three rows. 102 00:06:47,330 --> 00:06:52,250 So if we decide to run our up, what we'll do is pretty simple. 103 00:06:52,280 --> 00:06:57,770 We'll just go here and write down the one that shape. 104 00:07:00,440 --> 00:07:06,680 And if we run it, as you can see, we have right here two columns and three rows. 105 00:07:06,980 --> 00:07:10,580 So basically one column is the thing right here. 106 00:07:10,610 --> 00:07:14,280 So one, two and three rows. 107 00:07:14,280 --> 00:07:15,860 So one, two and three. 108 00:07:16,700 --> 00:07:18,140 So pretty simple to understand. 109 00:07:18,620 --> 00:07:19,010 All right. 110 00:07:19,070 --> 00:07:23,550 So next thing that we are going to learn is how to reshape our area. 111 00:07:23,810 --> 00:07:31,070 So let's say in this case, we have two we have two columns and three rows in the next one in the next 112 00:07:31,070 --> 00:07:37,220 function will learn to do is how to transform this function into a function that has, well, how we 113 00:07:37,220 --> 00:07:43,130 can transform this area that has two columns, entry into an area that has three columns and two rows, 114 00:07:43,160 --> 00:07:44,790 because, yes, it's possible to do it. 115 00:07:45,740 --> 00:07:48,430 So what exactly we want to do is pretty simple. 116 00:07:48,650 --> 00:07:52,070 So we will write down another line of code right here. 117 00:07:52,310 --> 00:07:54,280 We'll write down one. 118 00:07:54,370 --> 00:08:00,010 So in this case, it's our viable one and we want to do is one to reshape it. 119 00:08:00,170 --> 00:08:04,350 So we will write down the name of our variable again, dot reshape. 120 00:08:04,610 --> 00:08:14,450 So the name of this operation would be to reshape and then we open up our parenthesis and how many columns 121 00:08:14,450 --> 00:08:14,870 we want. 122 00:08:14,870 --> 00:08:18,710 In this case, we want three columns and two rows. 123 00:08:20,270 --> 00:08:23,030 So what we'll do right now, we'll just run our up. 124 00:08:23,180 --> 00:08:25,180 And as you can see, it changed right now. 125 00:08:25,190 --> 00:08:31,310 So basically we have the exact same area just this time with three columns entry. 126 00:08:32,090 --> 00:08:33,920 Basically, you can create another area. 127 00:08:34,330 --> 00:08:40,700 Well, with this with this area right here, you can have another area that has, for example, tree 128 00:08:40,700 --> 00:08:41,690 columns and three rows. 129 00:08:41,960 --> 00:08:43,820 If you do it, you'll see it's going to be an area. 130 00:08:43,820 --> 00:08:48,680 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 131 00:08:48,680 --> 00:08:49,300 make sense. 132 00:08:50,270 --> 00:08:55,080 So you can transform two, three columns and twos into two columns and rows. 133 00:08:55,520 --> 00:09:00,470 It's possible, but it's not possible to like, create weird things like, for example, and then valley 134 00:09:00,470 --> 00:09:01,870 of columns and infinity of. 135 00:09:02,110 --> 00:09:04,580 So that's just basic logic. 136 00:09:05,630 --> 00:09:10,000 So until now, you guys have learned plenty of basic operations. 137 00:09:10,010 --> 00:09:16,190 So the first thing we talked about, the item size, we talked about the details that allow us to know 138 00:09:16,190 --> 00:09:17,680 the type of data that we have. 139 00:09:18,890 --> 00:09:24,590 We talked about the end of the operation to allow us to know what is the number of dimensions inside 140 00:09:24,590 --> 00:09:25,560 of our area. 141 00:09:27,020 --> 00:09:35,870 We talked as well about the shape and the reshape function well, shape and reshape function that allow 142 00:09:35,870 --> 00:09:42,410 us to know well, to know what is the shape of the area and for the Reshad function that allow us to 143 00:09:42,410 --> 00:09:48,110 reshape our function, how we want it to basically transform columns into rows and rows into columns. 144 00:09:50,430 --> 00:09:53,870 So until now, you guys can see it's not that hard to understand. 145 00:09:54,040 --> 00:09:57,360 Those are really the basics with Python. 146 00:09:57,370 --> 00:09:59,100 So how to use Python? 147 00:09:59,130 --> 00:10:00,380 Those are the basic operations. 148 00:10:00,660 --> 00:10:05,640 So in the next few classes, we are still going to talk about some some other operations and some other 149 00:10:05,640 --> 00:10:09,750 functions that are pretty cool and some other cool stuff that you can do with them. 150 00:10:10,140 --> 00:10:13,350 So that's it for this class, guys, and see you all in our next class.