Data analysis in NumPy | Brian Tafadzwa Gomora | Skillshare

Playback Speed

  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Lessons in This Class

12 Lessons (56m)
    • 1. Introduction

    • 2. Google Colaboratory setup

    • 3. What is NumPy

    • 4. Data generation

    • 5. Cutomized data generation and Arith operations

    • 6. Size and data type of arrays

    • 7. Recap and 1D array Indexing and Slicing

    • 8. 2D array indexing and slicing

    • 9. Boolean indexing

    • 10. Statictical methods in Numpy arrays

    • 11. Linear algebra with Numpy Arrays

    • 12. Conclusion and project description

  • --
  • Beginner level
  • Intermediate level
  • Advanced level
  • All levels
  • Beg/Int level
  • Int/Adv level

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.





About This Class

This course seeks to introduce or recap the NumPy python library torwards its application in Data Analysis. We will tackle the interesting question, "Why NumPy" to get you started. We will then explore various NumPy functions as we apply them on our randomly generated data sets. You do not need previous NumPy experience, but just the basics of Python, to make it in this class. Expect an interactive class, with various exercises and finally, a class project. Specific skills you will gain includes expertise in NumPy, Data Analysis with NumPy and Data Transformation.

By the end of this course, you should:

  1. Be able to manipulate data using NumPy and its various functions.
  2. Have gained enough knowlede to advance to pandas and Scikit Learn.
  3. Be able to apply the learned skills in tackling an end of course project

In this course, we will be utilizing Google Colaboratory for practice and for the end of class project work. This is fairly easy to setup. The specific requirement is to have a Google account. Refer to the Introduction video on how to set this up.

Meet Your Teacher

Teacher Profile Image

Brian Tafadzwa Gomora



Hello, I'm Brian. Studying Electrical and Electronics Engineering at Ashesi University, Ghana. In 2020, I initiated my transition into Data Analysis, since then I have learnt from beginner to advanced through various platforms and my University classes. I am passionate about sharing my experiences whenever I get the chance. 

See full profile

Class Ratings

Expectations Met?
  • Exceeded!
  • Yes
  • Somewhat
  • Not really
Reviews Archive

In October 2018, we updated our review system to improve the way we collect feedback. Below are the reviews written before that update.

Why Join Skillshare?

Take award-winning Skillshare Original Classes

Each class has short lessons, hands-on projects

Your membership supports Skillshare teachers

Learn From Anywhere

Take classes on the go with the Skillshare app. Stream or download to watch on the plane, the subway, or wherever you learn best.


1. Introduction: Hello and welcome to this course. My name is Brian Camara, a data analyst, it ExxonMobil in Baraboo. Guess was more interested in botany, is in exactly a since I started transitioning into data analysis. And the experience has been solved profile you pin is what transition into data analysis. In this and many others to follow. We'll show you how I guess you are as interested as I am. Okay? In this course, I'll introduce you to NumPy, Python library. Expect to learn more about how to generate data in NumPy, how to perform arithmetic operations, indexing and slicing your datasets that we will generate using lumpy, who also lend more statistical operations and linear algebra with NumPy arrays. At the end of this course, you should be able to see the significance of NumPy integer analysis. Why is it important? You should be able to generate in and manipulate your own datasets that to regenerate using NumPy. And you should also be able to make a firm decision whether to proceed to pandas in the second lane. And I'm sure you be interested into learning even more about data analysis and the various libraries that we can use in Python. Okay? So you will find this documentation very interesting product costs. And you can always refer to it to learn more about various concepts about NumPy. So I'm going to click on it and we just see how it looks like. So this is how it looks like. So it takes you to the website. And from here you can select the fish Inuit one that I'm going to select the NumPy one paint, true and Meno. And it has Z to take me to this page way I can find whatever that they want to know. But now let's say I want to know what is NumPy. I can click here it to take me to the page that to describe what is NumPy. And it will give you some examples. We can wait. You can use NumPy and all that. Okay? So all these human wondering, who is this cross form? Can I take it? Yes, you can. This course is for anyone with some basic understanding of what Python, you do not need three f lambda dot numpy before the course itself is enough for you to catch up and follow along. So this is just more of a basic introduction. In the coming classes through talk within more about deep NumPy and under paid on libraries that you can use for data analysis. So at the end of the course, we have some project which is going to be interested in, Even though is going to be busy. But it will give you an offer theme of what NumPy is all about. In the budget. We have an opportunity to generate your own dataset. So you have the freedom to generate the data of your choice. And with this data, how expects you to transform it and then perform a statistical analysis on it. Or the information you need to carry out this project. You can find it read in this course. For this course, what you need is a cuckoo account. And who use these to create or set up a Google collaboratory environment? Well, Act is in far as exercises, and finally the project. In the next class, I'll show you how to set up the Google collaboratory enviroment. So what are we waiting for? Let's get started. 2. Google Colaboratory setup: I'm just going to take you through how to set up the Google collaboratory environment for this class. Okay, So in your search bar, type Google collaboratory, each end. So from this you can see the various search results that just Kim, I'm just going to hit Done and click the first search result that would come. They will come to to, to collaboratory dish cuckoo. Okay, It's just loading. It will then show you this screen. From here you can see that there is a recent tip. So this one shows the recent notebooks that you have withdrawn. And it can also move to the Google Trends shows the notebooks that we have saved in your Google Drive. You can also go to the GitHub way. You can see the various notebook that you have saved up. So here for this course. And we haven't created any notebook, so I'm just going to hit run and create a new notebook. Creating the new normal for us to sequence. Okay? So it is created the notebook for us. So this is how it looks like. From the top, you can change the title on me. I'm just going to call it intro to pi for theta and then went to hit Enter. So you can see this successfully updated the notebook name for my Okay, so, okay, so it is updated the or the changes. You can come here, you can see that there is a Connect button, should go in, hit Enter. So it connects your notebook so that you can be able to run the code that will be running throughout the class on testing various aspects of the course from the class. And was so when you're doing your project, should also remember how to do this up. Okay, So this one is a sale way you can ryan or is a kitchen quotes. So this CIF, this point 8, 0 to 1, p equal to 2 to 3. I end, I want to print a plus b. So once I have written this quote, when you're going to run it, you can either click on this one or is the fight as shortcuts that we have? So I like the most the Shift N d1. And then it will execute the cell for you or you can use the Control Enter to store them job. Okay, so let's say you have written this quote, but you'd also want to include some texts within your notebook. So you can refer pillow this cell and you see a text. One, hit that one. And here you can take the text that 31, maybe I wanted to say hello, the industry executed by Shift Enter or Control Enter. Okay, so that's the introduction to the Google Colab environment. So let's get started. 3. What is NumPy: So let's go for the introduction. So 15, you need to know what is NumPy. Numpy is just like numerical patron is the library that is 10 that is utilized for numerical data in Python. So ds specific data structures it is algorithm which will aid in important in numerical analysis. Okay, So why is NumPy of interest? Okay, so now because it's specialized, it can perform specific functions in Python, we can utilize that advantage. We know that something if it's special, can do what? It can do its job, like beta. So that's why it's fast. I sufficient. So this is collectively contributed to its multidimensional array object. So you come across the most often. So it just mean n dimension now RA, so that tries, it means when you come across an NGRI. Okay. So we will then also seen that the NumPy Eventbrite condensed various functions for performing element-wise computation with RA's. Okay, so, ooh, maybe we just want to multiply through RAs. We just want to multiply every element within an array by maybe 10. So this one we can just do it without any FOR loop. So remember when we're dealing with other areas, maybe you can come up with, you can create your array the top right. If you want to multiply every element in the array and we have to write a for loop that to index all the elements in the array, multiplying it by 10. But with NumPy arrays, there is no need for all that. You can easily, sorry, you can easily multiply in one sentence. So there are functions to do that. Okay, So also is specific truths which can read your best t-tests. It's too, he had created data in 12, write it onto a disk. There are specific tools that allow you to do that, that are also linear generation operations. Okay, so you can generate data which is linear. So maybe one data which is based, two. So 1357, something like that. You can be able to do that using NumPy. There is also a random number generation can generate random data using NumPy. Okay? So in this analysis, we'll see that number is basically used is in container where you can store arrays of data. So this usually large areas of data. And then after sorting this, we can pass them the areas that we have stored into various algorithms in libraries which would perform at the specific and computations. So the overall goal is that this number areas are more efficient than once we need to know. So in both storing and manipulating data, There's more specific because the design is the library that is designed specifically to handle such instructions. Okay, so let's look at how can we get started with NumPy. So just going to show you how you can import the library into your Google collaboratory. So here I just go in and type imports. Now pi. So this is the library. Okay, so important it is NP. And once you import it, you have to run. So once you run the 20th to import it again, you can use it throughout the notebook. So I'm just going to write each shift and and you can see that it is imported successfully the numpy library. So I imported it is NP. That's optionality can just OK import numpy. But this one will save you when you are now doing the, the week. So when you want to reference the NumPy library, you can just reference it is in NP. So it didn't just say np dot Arrays. We are now using the various objects within the NumPy library reference lab read using np. So you see the importance of this NP is quite long. So it just simplifies just through ways to type when you run it through the various quotes. Okay, so in the next class, we will talk more about how to generate data and add operations. 4. Data generation : Last we have learned how we can import the NumPy library into the Google collaboratory. Okay, so now let's see how we can use it to generate data. So we want to generate some data and print it out. See how it's looking like. Yeah, So going through genetics something. But what do you need to know is that there are various ways to generate data using Numpy. So you can either supply your own data or you can use the objects in Python or in NumPy to generate some data. Okay, So let me faced generic data using some opposite that exist within the 95. Okay, So we can say we want to call our data theta one equal to limit as theta. Okay? So remember when we imported numPy, we said you're inputting it is np. So I'm just going to say np FEV1 to reference the numpy library. So in Numpy, I want to utilize a random function and the rand function. Okay, so how does this one week, okay, Let me just finish this one. So is 32. So how does this runway? So I'm saying, Okay, From Numpy, I want the random function and in random I want to use the round object of randomness. Well, so this one will create a random ROE in this area will be of size three by two. So when we say size 3 by 2 in arrays we like, okay, so we have an array, it must have three rows and two columns. So say we want this size of three by two is three rows by two columns. Okay? So this is what is going to do is we're just going to go in to buy into our NumPy Python library and look for random, one that finds random in random it looks for Rand. I generate this random NumPy array. Okay? So after it created, the two can just call it. So now this array is existing the value of type data, I shouldn't be able to visualize the array. So I'm just going to shift into, and you can see our array. And this is it. We can see that we have this row, this row, this row. So I have three rows, and these three rows, we have two columns. This is a colon, this is a column. And in all these data values, there are randomly created, so you have no control over what it's doing. I guess. So there are various other functions that you can use to create data. So let me just explore an add-on. Okay, I add a proton. Let's say I want to use an anti 1. So let me say data one is equals to arrange three serving. And then below it I get one. So what this one does, era, because I didn't reference in NumPy. Click, Shift Enter. So gender is this Erin? Yes, 35. Because they, how is this one weekend? So it's going into NumPy. We look for a range. Once it gets arranged. How I arrange works is like this, is that this dust from three and goes up through self in but it doesn't reach serve in, so it goes to seven minus one. So if I have 10 a to go up to 10, and generics data with she's usually spaced by two. So c, 3 to 5. So that's how they arrange weeks. So you can see we have seen how to generate data using the inbuilt functions in NumPy. In the next class, we'll see how we can input our own data and turn it into a NumPy array. 5. Cutomized data generation and Arith operations: Hello class. So in the previous class, we talked about how we can use the input functions in NumPy to generate the, the, the, the data for us. So you want to explore what if I wanted to supply my own data? You know, like when you're doing a specific project, we have to supply on the TI. It cannot be using random data unless you want to just generate some noise in the data or something. That is if you are doing some machine learning algorithms. But also for us, lead us, let's say I want to supply data on some x, okay? This is x, so I just give some data about X. Ones that give some data about X. I just want to go I 8 and 10. This intron sought you need to remember is that you always have to reference NumPy because we are using functions from it. So I'm going to use the average function from numpy. So I'm going to pass x into it so that I'm separating the data that I wanted to conflict into the array. So after this akin coin running it, okay, so its trend, the trend, but then I didn't call it so that we can see two, okay? And just coordinates. So you can see now the F and RA created with 1231246 elements in it. Okay? So what if we have another y is well, that would want to incorporate routine this array. So here the thing that you have to notice that when we want the two variables that you want to store it in, RA, they have to be the same length so that you can be it, right? Remember the sale. There are a number of roles within an area. They are rows or columns. So if they have different number of elements in them, then Lou not have a consistent number of columns. So it means it will not generate the array for him. So okay, I have x and y now. Need to put it in an array. So I can come and include to Y here. If am to now run this one, you said that is now creating an array that has two rows, both x and y. It is four columns because IF four dimensions within each of the x and y. So this is just how you can create your own data. Okay, so in this now, we can do various other things. We can do multiplication again to anything. So you can see that the top here, okay, let me just use this slide. Let me say I want to multiply two arrays. I can use x details in example. So maybe mod 4 multiplication. I take x data and then I multiply it with maybe 10. So what's going to happen here? Can you pause and try and reflect on it? Okay, So if am to run this one, Let's see what happens. So it comes in, take x data. This is the end to multiply every element in x data by ten. So you can see 10 by 10 by 10 by 10 by 10 by two, like throughout the whole array. So that's how multiplication works. Or you can edit. We can go and say, okay, let me say, is it was true. I want to, is true Eris may be X Theta plus X. And then after this call, so that we see what it is calculus, okay? So you can see this one is if you're adding one important thing that we have to realize that these two RASS to be the same size and dimension. So it has to be, if this one is true by two, this one is to be too bad because it calls it. Then finally, they'll spit and failures in both arrays. It will tell you this one edge to another one. So it 81 plus 1, 2, 2, 4 plus 4 coin in that order. So hence this result. Okay? So again, it's many other things. Okay, so let me just quickly multiply the two. So if multiplied by 10, but we can also look at some went to, okay. Let me see if it, Let's say I want to multiply x delta, x delta. And then this one so that you can see enter. So it does multiply. So what it does again is element-wise going to look at the first element DA and cause to the next it looks for the fist multiplied those two, put Paris out in that order. Okay, so you've seen that we can do some basic arithmetic operations with NumPy. So I think you can go ahead and also explore felt that crypto on NumPy arrays perform this arithmetic operations. See you next class. 6. Size and data type of arrays: Hello, and welcome to this class. Okay, So in the previous classes with top-down much about rookie, how do I generate data using the ferry as NumPy functions. We also talked about how you can use your own data to generate numpy arrays. Okay, But we also mentioned something which is important about R is that is the size of the array. And we said this is represented by row by column. So if you want to represent the size of an array, Always row by column. And yellow are also going to explore another thing which is the type. We want to check what's the type of the array. And these are obtained using like the ship in dtype objects within the NumPy. Okay, so I'm going to start with this shape. So I'm going to determine the shape of this urn. Okay, as I'm typing, can you try and find out what's the shape for the array? So I'm going to type mode. Okay, So I want you to convey what you think with what we're going to get an a as a QP, so on. Okay, let's run it. Okay, so it get to fall as we could expect. We have two rows and four columns. I hope you caught that one right? Okay, Some also going to check what's the data type for this one. So towards dtype this time, and I'm going to Shift Enter. So it's telling us that this array is in statistic for the 13. Okay, So we will probably came across far as data types within Python. So it can always explore using the dtype to check the various data types that each of your arrays met represent. Okay, So at this point, and to say an experience that F head using sacred claim at this point. Okay. So what's said Lynn does is that it takes in data out two-dimensions. We get that one, right, right. Okay, So why me, I guess inside the plane you need data that yes, through their emissions. So how do you get two-dimensions if Vf data member that has four dimensions fast, I mentioned, because it cannot really control that one. You cannot leave me. It's okay. Like while collecting data that I want, two-dimensional data, you can have five dimensions of data. But then with NumPy, it allows you to leave me that fest I mentioned Theta or for damage no data into two-dimensions. So how do we do that one? So instead of just getting the shape, we can alter the shape. How do we out that the shape, I'm just going to show that to you is in this example. So let me generate some random data and our range generate six. Okay, So if you would want to see the data out looks like this, is it. With this data? What we want to do this, you want to reshape this data. So I'm going to say a reshaped some ship reshaping a forming Ananda data, be another array. Okay, so this has some important aspects. Some important condition that we have to put in this reshape function. So it's the number of dimensions that would want to reshape the data into. And it also needs the number of attributes that we want to be represented in the new data. Okay, So this number of attributes corresponds to the number of columns. So we're just going to run this one and we see how route like Oh, okay. Okay, so you can see that it has reshaped it into three dimensions. So one through three, we have three dimensions. And also the other thing that we can notice here is that we if two columns, because we limited the number of attributes to true, which corresponds to the number of columns. So this IFRS thing that you can play around in your datasets when it comes to exploring or analyzing data with various add libraries like the one that we just mentioned, psyche claim. Okay. So this is just one thing to note, will be used in RA NumPy array or in DRA. In this class don't just mean the same thing. That is the dimension array. So here's a quick exercise that you can just locates to np.zeros, two terrains, zeros. Okay? So this, okay, so neutral, like yay, we have true brackets. I want you to explore it. How does this affect the result? So if she has attacked by NU, Charles, always looked through the documentation. Okay. So let me just show you how it can look through something in the document itself. So what you can do is maybe you want to check how does the arrange way. So np.array and then you put a question mark, then you execute the cell. So to show you here the hell, what the range is all about and you can look through it and explore. Okay, thank you. I'll see you in the next class. 7. Recap and 1D array Indexing and Slicing: Hello and welcome to this class on, I'm just going to do a quick recap on the ferrous ultimate two operations that we have covered in the previous classes. And emphasize when the faith that when he and three element-wise operations, you need to make sure that your r is our same size before you can do that. Okay, so if they are not of the same size, then you cannot perform element-wise operations on the various areas that to matter. So I've showed you before how to check the size of an array. So you can always check the size of an array before you qualified to do the element-wise operations. So we have seen most of the operations. So this one is just multiplying, taking this array, we are multiplying it by the same RA. By taking this array, we're subtracting the same areas, which means we end up with 0 because we're just subtracting the same thing. And so you can also divide. You can take an array, one divided by an array. So this is element-wise going to take okay, once the face, okay, so in this case, this is going to be the fists value in the first columns is taking one divided by 1. Put this in the array. It cause one to vary by true. It puts it in the first filing, in the second column, and so on. So that's how he's waking again also drew an exponential. You can take an array, this one, and then raise it to the path to the pastor opened five is the same as taking the square root of this one. So it will go and take one to the power 0.5, total deposit opened by all the elements in the array. Okay? So you can also check like boolean, boolean operations again, check, okay, I have one at the top. I want to check, is this array greater than the previous array? So if it is true, I'll give you a result. So what would be the result? Let's say in this case, you can explore that one, figured out what will be the result. Remember this one is element-wise, is checking value by value and giving us a result. Okay, so we want to move on to indexing and slicing. Okay, so I'm in this class, I'm just going to talk about one dimensional is single damage. Now Alice, that's what we are going to work with in this class. Okay, So let's say we have an array. Okay? So this one, I have to demonstrate it. We have this. I'm just going to copy it so that we can run it. Okay? Okay, So this is the output, this is the array. Let's say a. We want to find out what's the on position five. We can index position Phi and then we click and it will tell us that position five, we have the value five. Okay? So let me just show you how positions are determined before you can call on. Okay, So this is the array, right? When you say you want to check position five, always remember that when you are indexing, the first 500 is position is 0. So step from 0, 1, 2, 3, 4, 5. And that is both seen fight with the value phi. That's where we got the result phi. So it's going and checking the array and finding out what's one position 5 and 10 displace it. So to count from nine coin because o is not that negative nine and negative four. Okay? So these ones, you can try them in your type, okay, so we can say five to eight in this case it will give me the value is between 58. In this case, also, it's going to select the values in the range 58 and then replace them with cough. So you can do all that you want with the array. So you can see that it's mutant boy, you can change its contents, is genuine. And then this one, it will assign all the values. So just select all the files, specify away I starting from it, no specific area in it. It will select everything in the array and then assign it to 64. I hope you understood and learned something from this in the next class twos, now look it to damage now. 8. 2D array indexing and slicing: Hello and welcome to this class. So in the previous class we talked about indexing and slicing single-dimensional arrays. In this class we'll explore two dimensions. And the idea is that you have when you took out both can be explored 234 dimensions, whichever you'll be working with. Okay, so this is the array that I created. So we can see that it has two rows and three columns. So what do we want to do is now try and see how does index in work here. How does slicing week here? Okay, so what I'm going to do is I'm going to say 2 D array. And I'm going to index position one. What, what do you think would happen when we do this? So I'm going to run this one entry we would confirm. Okay. So you can see that is printing the row, true. Why is it printing the road to, in the previous video would see that it can shake okay, 01 and then it should print us through. But then now there is confusion. There are two rows, so it cannot count along this one. So what it does, it cones tone down the row, the column comes down the column. So it will take this row is 0, this rho is one. So if I'm the index, why I need to print out to me, the row was that's what's corresponding to index one. Okay? Once if I want to print out for that, is this position in index one. So that's I have to do is that, okay? I have managed to call true row two. I now want to index alone or within the row true. So this one is now normal to what we did in the single dimension. So this one will represent percent 0, 1, 2 sorted. And now twist if I want to print out for is in position 0 along the axis. So here's keeping some notes. You first pick the row that you want using the indexing down there, all the columns. This one is index 0, this is index one. So if I want to want to true, then it's index1. And then now I can move along the row. This is index 0, index 1, index true. So if I want four, I can easily say position 0. So if I am to write this one, if I'm to run this one, let's see. So we see we get four. So this is just a confirmation. So with this one is well we can do slicing. But then this one, if you had to do it this way from the above example, It's not that it will go and slice or the, the rows that will be before the road to the road three in this case, because if it's index is always 11 minus the number of rows. So this is epsilon index in row three. And the two clear everything before three. If we were to draw this one. So this one would clear everything before row before three, right? This is the fifth thing that it does. After clean that it goes into their role and slice everything from one up to the edge. Okay, so let's go to the top here. So this is sort of like an official organization that can help you understand what's going on. Okay, So this is the first index when a drain with two-dimensional arrays. So when we say, when we say 10, this was representing the x is the x, the y x is, and then the x-axis would represent indexing along the row. So this can actually help you to visualize what's going on. So if I say 000 fed into the position in this, in the first row and in the fifth position in that row. If I say 10 is set one row, but on the first position in tetra, I only tell. In the next class we'll be talking about how we can draw boolean indexing. See you in class. 9. Boolean indexing: Welcome back. So in this class we're just going to run through Boolean indexing. So how this one works is we are trying to convey in array of strings to an area of numbers. So we have Sarah Blake maybe names in our example. So we want to check out, Okay, in this nims array, how many does Bob okay? Or we are just going through this. Is Bob here. If he stayed true, if it's not their fault, if it's if it's not a false if it's true. So like if I were to run this one, an MC bar to Bob, so it's just going through the array. Checking for Bob ways, returns a Boolean, true or false. Okay, so after that, what we want to achieve is that we also have a delta of equal size to this one, where the file is correspond to the names that we have here. So now it will add to index, the data would be named according to Pope. We expect to get the values that correspond to the name Bob. Okay, So remember we're indexing, maybe we're specifying that we want to get to eight, we can give those specific positions. Now one gets presuppositions when Pope appears in the RHS. So this one already been named Bob with an RTOS or we are indexing the true That should give us the positions or the data or the files that correspond to both into the data array. So this is just how this one is working. So you can try it on your own and see how it goes. So we have in Excel exercise at this point. And so he went to modify the example that I just talked about. So what I want you to do is to select the rows, the name Pope, and pass this in indexing data array. And then you check what our kids, after checking the size. I want you to repeat this same procedure, but selecting the name's Bob and Joe at the same time. So this time around you're not selecting only bot, but they're also selecting Joe on top of that. So how can you do that? You need to remember your operators, your Boolean operators, or how do you end out with t and 0? So that would help you. Okay, so that brings us to the end of this class. In the next class we'll talk about some Vitamix current statistics come networks using NumPy arrays. 10. Statictical methods in Numpy arrays: Hello and welcome to this class where we are talking about mathematical and statistical methods. In this class, I'm just going to be going through some of the statistical operations that you can perform using NumPy. So we awaken with this array. We shall generate it using the random function. Okay, so we want to see how we can explore. So usually doing a trick enough statistics, we usually want to know what's the mean as this sum. Okay? But let's start with finding, let's say the mean. So if you want to find the mean for affordable for the data, you can easily go and type the name of the array. Dots mean so many functions. So don't forget this parenthesis. And then you run. Okay, so it's saying okay, to run this one, okay, so now it should wake case. So you can see now it gives us the mean for this dataset stored in the array. Okay, so what if you would also want to find the sum? We want to sum, okay, huawei, what? We can go. For some members, the function you need the parentheses, acquiring brands. So it's going to find this sum here. Okay, so there's this issue again when we are dealing with these operations. When we have an array which is not seen dimensional. So we can specify a traveling wave we want to sum, so we can specify that, okay, so we want to sum across X is why we want to sum across x is 0. So we do that by specifying when we run the code. So we can say we want to find the main way we do and find a Min one to find it along the x. So you can see, even when I'm typing, you can see all the things that you can modify. Modify the x's, the data type out, keep dimensions. So all these you can play around them. So I'm just going to specify axis here and went to find across the x is one. So restaurant and testing. Okay, so now it comes, then it runs and gives us any good. It just looks through the x's and find the mean. And then it just puts it in array form. Okay, so this is just some of the examples of the statistical operations that you can do with NumPy. So again, IV also even explore how you can find the standard deviation, the variance, the mean, cumulative, cumulative product or this, you can also explored them. So at this point, our advice like really getting familiar NumPy documentation. So there are ways on how to implement this and to really help if you want a career in data analysis. Okay, so in the next video we'll be talking about some linear algebra and also out to transform data. Okay, still see you in the next class. 11. Linear algebra with Numpy Arrays: Welcome class. So lastly, I would want to talk about linear algebra with NumPy. Okay? So this is the same example that we are going to quote. I wrote some time. So I'm just going to execute it as recall alone. Okay, So in and run it. Okay, so what we want to achieve, so I just created some data, x and y. So x and y, we can do many things with it. We can perform a dot product, x dot y if you want to perform a dot product. So you can just see that this is the function that you use is found in NumPy. So you definitely need np and then taught as the function that will take x and y and perform the Dutch portrait between those two in urine and answer. So you see, this is the dot-product that we obtained when we calculate, when we take in x and y. Okay, So apart from birth from the total spin read through, of course, we need to transform again to transformations using they've been using NumPy. But for you to be able to transform or to alter or find infest, you definitely need to import another library or another object within the NumPy. So what we can do is that, okay, We can come in here and import this from NumPy. So a dreamy is going into NumPy. Then we're going to look for this. And once it gets it when it is in NP. Okay, so what are we doing here? We already imported this one, but we just want to hear feet in a form that we are familiar with docking site. So it'll be easier for me. So it's going to find an in-phase for all that. Like I might wonder if AF in array, I can get the interface. Okay? So when we run this one, once we run it, so we can create another cell here. What do we want to draw? Okay, let's create some data. This one, so I'm creating some data and restoring Newton in RAX. So once we have the data here, okay, so you can run it. This is the dataset, so the FX. So we can, there is another array here, quote marks. So this one utilize the top products and it also underlies the, the transposes transpose X Theta one's a transpose, it carries a dot-product. Okay, so this is going to wake county. I create an ADA, run this one. So I have to call it so that we see the result. Okay, So this is what we get. After we've done the transpose, will perform the dot-product. We come to this part. Okay, So this is this caloric and two, so we can also do the inverse. You can go and invest of this one. Then you can run it in Excel, get some results. So this is how we can explore, explore many other things. When it comes to arrays, you can do lots of stuff. Using linear algebra, can transform the data. You can explore this as well. That the NumPy documentation. I feel like that's what helped me a lot. When I was doing. 12. Conclusion and project description: Hello class. This is the end of our course. If we have any questions or concerns, please feel free to type them out in the discussion. As you'd expect, there is an interesting project that we have to try. Your hands on. Opia's excited as I am. So I'm just going to run you through the project description in this video. So for your project, you will have to randomly generate a dataset of your choice and call it x. After you've generated the dataset, I want you to go ahead and find the shape and tape off your dataset. After this, I want you to change your x. That is the dataset that you have generated into two-dimensions in one feature. Okay, after all this, the most interesting part will be for you to know in a tabular form provided various statistical operations that we have learned in this course in doors that we have explored in your free time. I would also want you to try out exploring these statistical operations along specified x's. So you can draw for x is equal to 1, x is equal to 0. So Duan due to explore various and conditions that you can pass through the statistical operations that we have lend. Lastly, I would want you to regenerate it two by three array of data out of the eggs that you have generated and stored this in their variable y. In all these, I would want you to recall the concepts that you have learned throughout the course to apply choosing the right input function to use in the one that would he hoped to achieve the goal for the project. After all these out1 to, to explain each of the function or orbitals that are used so that we know that you really understand what we're doing. And airborne to recall everything for the deliverables are due under the submitted document with your solutions, this can be a PDF or a Word document. I also want you to submit your notebook called so that I can see how we have gone through this project from beginning to the end.