 Indices by default will always be 0, 1, and 2. And similarly, if you want to select multiple columns, you can simply pass the list of the names of the columns that you want to fetch. And any guesses for the structure will be there? Exactly. Easy, right? So easy. So yeah, it will be tough for you when you want to fetch a row. You can just simply pass a index of the row. We just pass the index of the row to the location map, which is LOC. And it will give you another series. But as you can see, the indices now are changed. Insts will be the column names now, because in this case, when we fetch a row, the data is really x, 6, and true in this case. And the indices will be the names of the column, because those are the identifiers for any value. So now if you want to fetch the multiple rows, what we can do is just do it the Pythonic. Just mention whichever rows we want. And it will, of course, fetch the 0, 10 first row, like this. So that was just like when you know that what you're going to fetch. But what about if you have some conditions, like if you want to fetch some data based on the value in some column, then you can just do this. So in the square baggage, just mention the condition that you have. And easy to guess that it'd be a data frame. It will just return those rows, which satisfy the condition. And the condition can be on any number of columns. As we can see, the source of a complicated example, which is, let's say we want to, let's say a hypothetical condition. We want to fetch the rows which have x or z value in their first column. We can do this. Like it can be any sort of complicated condition. And it will just fetch, according to your condition, in this case, this. So let's say we have these two data frames now. As you can see, there are a, b, c, and d indices for the first one, and a, b, and c columns. And the second one, a, b, c, d, e, as indices, and a, b, as columns. So if we decide to merge these, if we decide to add these, which is like addition operation, not exactly automatic, but we'll see how it is not exactly arithmetic. It will return you this. So as you can see, some of the values are some of corresponding values in both the data frames. But some of them are not defined. It's like a not a number, which is non-type in numpy, and which is sort of ported to a pun, because it relies on numpy. So why are some values not a number? The reason is, for example, for e row, for e index, there's no value in the first data frame. So it doesn't know what value to add, what value to fetch. And that's why it cannot perform addition operation or a merge operation on e. So that's why all the elements of e in the resultant data frame will be not a number. And the same the case with the c column as well. We see a lot of not a number values. How can we handle it? If we could every day, we know if something goes wrong, either we draw it, either we eliminate the disk, eliminate the bug, or we fix it. It's as simple as that. So let's see how we can handle these values. We can either draw them. Either we can say, OK, if anything is not a number, we don't want to keep it. Or we can just say that if anything's not a number, we're going to fill it with some value and on the basis of some logic. So let's say the first thing, if you want to drop the values, you can just pass on the matter like drop NA. And by default, it's got to drop all the rows, which have at least one not a number value. So it has at least one unfined value. It's going to drop all those rows, as we can see this. And there may be a case when you want to say, OK, second row, like the index two row, has some values, has some data. So you want to keep it, because it has some data and we're not going to lose it. For that, we have another method, which is you can pass a parameter saying, how do you want to drop the values? You want to drop the values only if all of the values are unfined. So it will just drop the last row. So it's not going to lose any data, which you are losing in the first case. And let's talk about another case, like when you fill the values in some manner. So we have this data frame again. And what we can do is just pass a default value which we want to, this is one case, when you know that there is something undefined, you want to fill it with something like let's say 0 or minus 1 or something, which is like the default value for your data. And it will just simply replace every not defined value with that default value that you pass. And if you don't really want to do that, like if you're like, no, why should I fill it with 0? Fine. You can use the NA method with the parameter, which is like forward fill, F fill is for forward fill. And what it will do is it will take the value just above the not defined value and copy it all over. So as you can see, in the second row, there was a not defined, like not a number. But now it is 10 because the 10 is copied from the last defined value. And similarly, you have backward fill methods as well and just pass the method equal to B fill and it should be fine. And yeah. So this was a case when it just copied over everything. But there may be a case when you just want to copy one, like a copy twice and know that if something is really wrong, then you want to drop all the rest of the values. But you want to surely want to copy some of the value. So you can define the limit. And since the limit is 1 in this case, you can see one not did not a number value still left because, of course, because of one limit. And it won't copy more than once. Let's talk about indexing now. Like I've talked about indices like we have 0, 1, 2, or we have ABC, we can have custom indices. Let's talk about a little bit more in detail about that. So for this data frame, we have this index. And we can just fetch the index. We want to do something, the index. In this case, it's not really good to be useful. But as we can see, we'll see later, it will be really like indices can be anything. And this is a way to access any index of the data frame. So let's say we have this data frame once again. And what we want to do is we want to change the index. And we want to assign some column as index. Like we want to use one column as index. Just like we use in databases, we define some column as an index. And so that searching is easy. And everything is searching, sorting everything easy. So we can do the same thing here. We can just pass the name of the index that we want. And as you can see, the new data frame that we will have will have that column as index. So everything you are doing, you in the index now, will be done using these values a, b, c, and d. Let's see how we can do that. So same thing. We want to fetch a row. We can just pass the name of the row, which is now a character a, because it's the content of the index. Zero is the index in this case. And you will get this. You will get a list. Values are of course only six and true, because a is already in the index now. And yeah, the columns again become the index, as we saw earlier. And you can do this as well. If you still want to go with row number, like zero-based index, you can still do the i-trail location, which is i-lock. And you can use that for doing the indexing, the rows as you were doing earlier. So let's talk about if you want to have multiple indexes, like multiple lower indices. So what I've done in this case is I set the index, and let's see the result first. So what I do is I pass the list of indices, which is 1, 1, 2, 2. So what that means is whatever my current index is, assign 1 and 1 to the first two elements in the indices, and 2 and 2 to the other 2s. So that means it will create a multi-level data frame, multi-level index in the data frame. And 1 is going to be the sort of a parent index for A and B, and 2 is going to be the same for C and D. So once we have this multi-level hierarchy, let's see how we can perform some of the operations again. Again, we want to fetch two rows. Let's say we want to fetch all the rows which are under one index. We can simply do this as we were doing earlier. And it will give us that frame because that's a structure for the data that we want, because there are multiple rows. And if you just want to fetch still one row, we can still do that. But what we need to do is we need to make sure that we traverse from 1 to A. So we simply pass a list of all the indices, the sort of hierarchy that we want to pass on, and it will just return list again. We have another thing, which is like transposing data, which is really useful when we are operating on some matrix operations or something. And as you can see in this case, indices were 1, 2. And then the next level was A, B, C, and D. Now we have the same level of hierarchy in the column names. So the column names for bar and bars become the indices. And now index is not multi-level anymore. And it's just one level. And the column structure is multi-level now. So that was just about like manipulating data and manipulating rows and fetching rows that may have seemed really simple. But it's not that. Like pandas is not just for that. It's also for all the statistics, and any statistics operation that you may want. So for example, this describe method, it is just like else is described. So it will return you a lot of useful information about your data, like the statistical information. Like it will tell you average, maximum, first partiles, second and third, bunch of things like this. So this is a useful method for finding any information about your data, like when you're like, OK, just have a glance about your data, like what's there, what's the information in your data. There's another method for finding the covariance between different columns or between different aspects of your data. And there's also this method for finding the correlation easily. And there are a bunch of other methods for finding the rank. Like if you have some value in the column, then you want to fetch. If you find the rank of that value in the column, we can easily do exactly the rank of this value for all the values in the column. And you also have this another method for finding the cumulative sum of all the values in one column. OK, so now comes the most difficult part. That's a live demo. Let's hope it works. Is it visible at the last line? Yeah? OK, cool. So how many of you are like football fans here? Do we have any football fans? OK, OK. So the data that I've fetched today is the number of goals put by Messi and Ronaldo in the last 10 years. And we're going to analyze their data and to see how we can make some sense of the data that we have. So I'll go ahead and just import the library. And this is a data frame. This is like I actually construct the data frame from a dictionary. It may be fetched from anywhere. Like maybe come from some fetching the data from some mapping or some database or anywhere. And so once I build the data frame, if I try to print it what it looks like, you may find it familiar now, because that's how it looks like in my slides as well. So it has one row. Like for each year, it has one row. And it shows the number of goals scored by Messi and Ronaldo for that one year. Let's see what we can do. So since we know that we make the index as year, then we know that we can easily fetch the number of goals scored by any one of the players in that one year. So that's why I've created another index, which is the entry column, which is year. And now let's see how we can operate some of the operations to make more sense of this data and to see which one which player is better. So if you want to fetch all the goals scored by Messi, all the performance of Messi in the last 10 years, we can simply just as simple as accessing one column. We can just simply do that. And if you want to find one row, like if you want to find in 2016, how many goals were scored by each of the players? You can simply do that. Like it's so easy. And if you want to find all the entries when Messi scored less than Ronaldo, you can find all those years. And as we can see, there are only six years when Ronaldo scored more, like not only, but yeah. So this is another useful method which gives you information about your data. And it clearly shows that it's a Python class, a data frame. You can see the entries are in teachers. 10 entries, 2017 to 2016. And data columns are only two. Messi, phenomenal integer values, and same for Ronaldo. And it also shows like scored 250 bytes. Who cares? Oh, maybe care, but not really. So if we want to find the head, like we want to just see how the data looks. We can simply just pass the head and number of values that we want to fetch. And we'll just show you sort of a snapshot of the data frame how it looks like. And same thing is if you want to see it from the tail. You can mention the number of elements that you want to see. And both head and tail, if you don't mention any number of elements that you want to see, then I'm going to show you five elements by default. So this is the method I was talking about. Describe. So it gives you a bunch of statistical parameters. Like you can see the count, which is not really that useful in this case. Mean standard deviation, you can see the minimum, 25% dial, 50% dial, 75% dial, and max value. So yeah, there are a bunch of other methods that are like finding the covariance between these two players, which is not really useful in this case. But it may be useful if you're operating on some data which really need to find what's the covariance between some variables you want to see, something like that. And you can really do that. And there's another thing which is correlation. In this case, the correlation won't be really too much because they are independent players. And they don't play deathly scoring more. And I'm going to score more as well. So there's not going to be much correlation. And we also have this sum. OK, this one is interesting. So as we can see, Messi has scored four goals than Ronaldo. I'm not saying that. Data is saying that. So don't blame me if you are like Ronaldo fan and you're saying, no, it's better. So just that's what it says. And we always go with what data says. Yeah? Maybe, so yeah. Yeah, I knew that was coming. See, I'm not saying anything. I'm not making a statement here. So yeah, there's another method which is cumulant sum. And this really allows us to find the number of goals scored by each player at any moment, like at any point of time, at any years. Let's say we want to see how many goals were scored in 2012, let's say. As you can see, there were 304 by Messi and 270 by Ronaldo. So it's really easy to make sense of data. This is, of course, really a small data set. But you can do whatever you want. You can do operations on big data as well. Not exactly the big data, but the data that you can hold in your memory. And yeah, that's all I have for the demo. And no. OK, anyway, I'm done. Yeah, thanks. Do we have some questions? No. So data for each of the elements can be anything. Like it doesn't have to be same. Yeah, you can mix it, but it's going to be difficult for you if you have to manual data. If you want to put some condition on that, it's really going to be you have to check for each value. Like let's say you have integers and strings, right, in one column. Yeah, you can have that, definitely. But when you have the fast data, you have to recheck, like, if you are giving some condition. You have to check the type and then compare. So it's really going to be difficult for you to make sense of data to analyze the data. And you can find me on all these social links and reach out to me if you have anything to talk about, anything interesting to talk about. So do we have any questions here? Any question that how big data should be to use partners? It should be more than one element. That's it. That depends on memory. Like, because all the data that it's going to have is going to be in memory. So it just depends on what system you are on. And it really is a system dependent. So it is like, of course, there's going to be complexity thing as well. But that's sort of proportional to how big your data is. Do we have more questions? Yeah. Do we have any more questions? Index of one, one, two. And then you will transform the data, right? I'm not sure I understand your question. Index, one, one, two. Yes. And then you transform. Yes. Yes. And then you have to see a second column. Yeah. I guess that's no option. The second column is for that area. Oh, yeah, yeah, yeah. I'm not sure about that. So your question is there, whether we can add multiple level columns directly without doing the samples, right? I'm not really sure because the library is really big and I'm not aware of all the functions, all the methods. But I'm not really sure. I didn't check that and see because the library is really huge and I'm not aware of all the methods. Yeah? Another one? Yeah, you can do that just the same way as you were doing for this. So you need to go from one to A. Let's say one from one A. And you need to pass one and A. And it's going to see like, OK, six one and not different one. So it's going from A from one to A and it's going to just run the first column. So it's exactly same as we saw here. Yeah, it's just like traversing through hierarchy, like just a tree or something, like you pass along. Any more questions? OK, thank you.