1 00:00:05,580 --> 00:00:06,490 Hey everyone. 2 00:00:06,540 --> 00:00:13,050 So in this video we are going to cover the operations on us and we can see some inbuilt matters that 3 00:00:13,050 --> 00:00:15,330 are given independence in Python. 4 00:00:16,260 --> 00:00:22,110 So here I have mentioned some of these methods some we have already covered and the rest you will find 5 00:00:22,110 --> 00:00:30,250 on any Web site like here geek for geeks good watching here many methods for pandas are given and therefore 6 00:00:30,250 --> 00:00:37,190 the difference usually and you can check any of these and like drove that we have done and there are 7 00:00:37,190 --> 00:00:38,030 many more here. 8 00:00:40,080 --> 00:00:47,280 You can get any of these and just by clicking that one that will deliver you to that particular method 9 00:00:47,280 --> 00:00:47,920 page. 10 00:00:48,150 --> 00:00:52,790 From that you can have idea that how it works. 11 00:00:52,800 --> 00:01:00,870 So here we have a method that we are going to call him out of these these methods because or discussed 12 00:01:01,230 --> 00:01:04,640 without explaining them here. 13 00:01:04,650 --> 00:01:07,230 You will understand better than I show you. 14 00:01:07,230 --> 00:01:13,980 So first of all I need a data frame so let me do my own data frame X is equal to in that we do it directly 15 00:01:14,940 --> 00:01:16,590 without defining any dictionary. 16 00:01:16,770 --> 00:01:19,370 So here we have a data frame. 17 00:01:19,680 --> 00:01:25,950 They are revealed in the dictionary do something like a and pass the values like One two three four 18 00:01:26,100 --> 00:01:27,370 and 5. 19 00:01:27,960 --> 00:01:42,930 Then we have an interdiction and at least two that is B and that is something like 20 34 B 50 and 1 20 00:01:42,930 --> 00:01:45,780 value with the same amplitude. 21 00:01:46,590 --> 00:01:48,100 So here we go with this one. 22 00:01:48,150 --> 00:01:55,850 If you write X you will get this one so for these two methods that is index and columns we do not require 23 00:01:55,850 --> 00:01:57,490 any parameters. 24 00:01:57,500 --> 00:02:06,320 You just need X diode index and you will get only index every level there like beginning from zero and 25 00:02:06,320 --> 00:02:15,360 there are five indexes and each step is one if you increase this step then that would be different. 26 00:02:15,360 --> 00:02:22,470 Now after that one we have columns that is also simple one just write C O a luminous here and you will 27 00:02:22,470 --> 00:02:23,210 get the columns. 28 00:02:23,220 --> 00:02:26,720 That is a and b and their data type is object. 29 00:02:27,750 --> 00:02:29,760 So that's how you can work with these two. 30 00:02:30,330 --> 00:02:32,940 So they are not much important. 31 00:02:32,940 --> 00:02:40,260 Now we have this one that is apply and some we have already done but still I want to show you like if 32 00:02:40,260 --> 00:02:49,500 you want to some and you the value just boss that one and dot some you will get some of all the elements 33 00:02:49,520 --> 00:02:51,490 available in that particular column. 34 00:02:51,480 --> 00:02:58,740 That is 160 apply methods something like If you have any function that you defined by yourself like 35 00:02:58,740 --> 00:03:08,430 hey if I define an increment function and pass a value to that like X any parameter and then X fully 36 00:03:08,490 --> 00:03:13,380 equal to x plus 10 or we can say a hundred. 37 00:03:13,380 --> 00:03:18,900 That will be the increment in X and then return x. 38 00:03:18,900 --> 00:03:20,460 That's the function that we have defined here. 39 00:03:20,460 --> 00:03:27,630 Now if you want to apply this function to all the values in B then we use this apply method here. 40 00:03:27,630 --> 00:03:30,750 This fund stand for function. 41 00:03:30,750 --> 00:03:38,030 So you can do something like this X and then pass the column you want to have the function applied on 42 00:03:39,180 --> 00:03:42,360 then don't apply. 43 00:03:42,690 --> 00:03:48,150 And then the function just the function nothing more you will get the output hey a hundred is added 44 00:03:48,150 --> 00:03:52,140 to all the values so you need to pass here. 45 00:03:52,330 --> 00:03:58,710 Is like this one you will get edit or any parameter like column B elements you will again get there. 46 00:03:58,920 --> 00:04:04,410 So just increment and you will have the output. 47 00:04:04,410 --> 00:04:10,810 After that we have another method that is sold underscored values and that's something like sorting 48 00:04:10,820 --> 00:04:26,110 refers to if we have the values like 1 4 2 4 5 6 3 so 2 3 and 9 6. 49 00:04:26,370 --> 00:04:32,980 So sorting that US to arranging them either in descending order or ascending order and generally in 50 00:04:33,090 --> 00:04:42,030 row computer programs we preferred ascending order like 1 to 2 here we have to do then we have three 51 00:04:42,510 --> 00:04:50,270 four four then we have five then we have to six that is this one then we have nine. 52 00:04:50,280 --> 00:04:53,210 So here we have all the values in ascending order. 53 00:04:53,970 --> 00:04:57,320 So this is known as sorting and in programming language. 54 00:04:57,510 --> 00:05:04,830 There are many algorithms for sorting the elements like bubbles or chairs or but they are not a topic 55 00:05:04,860 --> 00:05:06,300 of slaves here. 56 00:05:06,660 --> 00:05:11,460 So I just show you that how you can sort out the element without discussing the methods of sorting because 57 00:05:11,460 --> 00:05:19,260 that will be a very complex topic and you can also study about that one by just googling like go to 58 00:05:19,260 --> 00:05:23,070 Google and just write there sorting 59 00:05:25,730 --> 00:05:34,160 methods and you can find the methods in Python also that you will see that you have different sorting. 60 00:05:35,510 --> 00:05:39,250 So you can check them that's for you now to sort them. 61 00:05:39,260 --> 00:05:46,430 But we have already sorted elements in B like 20 to 20 30 40 50 that we just somehow wearing them like 62 00:05:47,240 --> 00:05:55,260 hair this 150 this one 40 and there we have 20. 63 00:05:55,520 --> 00:06:02,820 And then in last we have between 20 then we have this list now if you want to so the values just you 64 00:06:02,820 --> 00:06:13,380 need to do like X I need to sort of the values in X don't then sort underscored then you pass a function 65 00:06:13,410 --> 00:06:19,650 that is known as sodium and mental distress values and in that you need to just write the column name 66 00:06:19,650 --> 00:06:27,000 like beep the elements will be sorted like 20 20 30 40 50 that's what we have before this one and the 67 00:06:27,000 --> 00:06:33,330 index is changed now and the values of E are also changed but we have sorted according to be you can 68 00:06:33,330 --> 00:06:43,860 do same thing with age also like if I had this one to one this one for this one five and left this one 69 00:06:44,160 --> 00:06:51,690 three and you have this rule until now if you do with a you will have sorted according to it you can 70 00:06:51,690 --> 00:06:56,610 check this out these are not sorted these are sorted but the other values of different other columns 71 00:06:57,330 --> 00:06:58,450 doesn't matter. 72 00:06:58,890 --> 00:07:00,200 So that's all you can. 73 00:07:00,210 --> 00:07:07,200 So the elements in a needed frame now we are done with the sorting also in few basic are left. 74 00:07:07,190 --> 00:07:13,970 Now that is the unique and unique and let me got them from here. 75 00:07:13,980 --> 00:07:19,530 So we didn't get to go up there again and again and remove this one 76 00:07:22,720 --> 00:07:23,070 no 77 00:07:26,880 --> 00:07:32,930 here these are not unique efforts to finding the unique value exist in that particular data frame. 78 00:07:32,990 --> 00:07:39,980 Like if I want to have the unique value in be unique like the 40 50 30 and 20 they are unique values 79 00:07:40,520 --> 00:07:48,710 the 20 twice here refers to 20 is not unique that that is twice so we will consider 20 only once in 80 00:07:48,710 --> 00:07:55,190 unique unique wrappers 2G orderly singles value that are available not the repeated ones repeated ones 81 00:07:55,190 --> 00:07:59,430 are also included but only once not like twenty two times. 82 00:07:59,570 --> 00:08:03,230 So that's what something like X dot then. 83 00:08:03,770 --> 00:08:10,700 Sorry first X and positive column you need to have the unique values in which so X then the columns 84 00:08:11,330 --> 00:08:18,980 like be able to find the unique value in B and then you will do something like just unique and you will 85 00:08:18,980 --> 00:08:25,810 get the unique values like 40 50 30 and 20 here you notice we did not have twenty twice and there's 86 00:08:25,850 --> 00:08:31,370 one more that isn't one of those and unique that will provide you with all the unique value available 87 00:08:31,850 --> 00:08:39,320 there but not the amplitude just in numbers like hey I have four values that are unique and if I also 88 00:08:39,320 --> 00:08:49,250 change this 20 into one to ten there now you will be listing as a network that you will find five here. 89 00:08:49,670 --> 00:08:53,540 So that's how you can find the unique values. 90 00:08:53,540 --> 00:08:56,370 So we are also done with the unique values. 91 00:08:56,370 --> 00:08:59,890 Now just is null and value comes left. 92 00:09:00,410 --> 00:09:01,260 So value counts. 93 00:09:01,280 --> 00:09:05,790 Left is something like If you do X don't 94 00:09:08,460 --> 00:09:11,430 let me perform that one here. 95 00:09:11,530 --> 00:09:22,200 Removing these X stored value underscored comes glances if you get the adder. 96 00:09:22,940 --> 00:09:24,650 Let me have this one 97 00:09:28,610 --> 00:09:29,700 so here. 98 00:09:29,720 --> 00:09:31,730 Had not passed the colon there. 99 00:09:32,480 --> 00:09:38,930 And David go so well you can deliver to how many times the particular value of course like here all 100 00:09:38,930 --> 00:09:39,880 the values are false. 101 00:09:39,890 --> 00:09:46,930 If I again convert that into there and I have to do so now. 102 00:09:47,510 --> 00:09:51,880 And if you perform this one again you will get twenty twice last one. 103 00:09:52,430 --> 00:09:59,890 Now if I also convert this one into 20 and this one into 40 and then you do this one you will get 20 104 00:09:59,900 --> 00:10:01,550 thrice and forty twice. 105 00:10:01,550 --> 00:10:09,260 Here you also need to pass this colon particular column and that's about the value count. 106 00:10:09,290 --> 00:10:11,780 Now the last one is something just to check. 107 00:10:11,990 --> 00:10:16,670 Is there any null value or not is the data frame is null or not. 108 00:10:16,670 --> 00:10:25,790 So that's something like just pass X node and is null then dependencies you will get false 44 for every 109 00:10:25,790 --> 00:10:34,910 value and if you have something like here and B don't none and like here I got the idea for that one. 110 00:10:34,970 --> 00:10:36,890 So that's what I want to show you here. 111 00:10:36,890 --> 00:10:38,660 If you have any known value there. 112 00:10:39,230 --> 00:10:43,760 So at that particular value it will be true otherwise that will be false. 113 00:10:44,180 --> 00:10:53,100 So that's how you can have the null method out so you can check that one some more methods. 114 00:10:53,100 --> 00:10:59,170 I have told you the website group two weeks there to check this and I hope you got all the matters there. 115 00:10:59,370 --> 00:10:59,940 Very easy. 116 00:10:59,940 --> 00:11:05,310 Just you need to focus that where to add to the parameters there to our decoders. 117 00:11:05,370 --> 00:11:08,670 So that's something I believe you are also finding confusing. 118 00:11:08,730 --> 00:11:11,490 So focus on that one and prevent the item. 119 00:11:11,490 --> 00:11:12,820 So thanks for watching. 120 00:11:12,820 --> 00:11:13,850 I was in the next video.