WEBVTT 00:00.810 --> 00:05.160 They come back and this next level we're talking about hope I'm US and the next day too. 00:05.210 --> 00:06.810 We're talking about Japan notebook. 00:07.220 --> 00:08.900 So what are these two. 00:08.960 --> 00:12.440 So firstly I want to talk about whenever we're going to work with pandas. 00:12.800 --> 00:14.750 So we'll be dealing with details. 00:14.810 --> 00:17.390 So we are not going to work with any editor. 00:17.450 --> 00:20.500 So I'm open and I'm at the bank just for some comparison. 00:20.780 --> 00:24.260 But at this point of time I find does mean it exists. 00:24.320 --> 00:26.560 Exactly seem like interactive. 00:26.930 --> 00:30.410 But it would be easy for us to the domain different type of data. 00:30.680 --> 00:34.080 So that said what are we going to do with pandas. 00:34.100 --> 00:40.790 So basically we take some data in the form of list additionally on maybe a text file maybe a CSP file 00:40.820 --> 00:47.960 maybe an Excel file or maybe a decent file use a python library and then we use a different data structure 00:48.020 --> 00:50.240 which we call as data frames. 00:50.390 --> 00:55.790 You would understand everything once we start doing all the operation that we are going to perform with 00:55.790 --> 00:56.810 the help of find us. 00:56.810 --> 00:57.480 Come on. 00:57.560 --> 01:00.170 Will we perform or data frames. 01:00.170 --> 01:08.060 Maybe if I talk about slicing and nixing merging joining concatenation or maybe dealing with columns 01:08.060 --> 01:14.920 and rows or maybe other form of data manipulation everything would be perform or our data frames. 01:15.130 --> 01:17.300 So without any delay let us get started. 01:17.390 --> 01:26.830 So first I need to install my I bite on all you have to do is just pip install I buy it on. 01:27.070 --> 01:32.080 And don't forget to check its description or buy by while it is getting downloaded. 01:32.080 --> 01:38.350 Let us discuss first one thing while we use inductive deactivation the main reason is to best our command 01:38.830 --> 01:44.980 and whenever we test our commands we majorly focus on inductive shift because we get our result instantly 01:45.280 --> 01:51.460 or if there is any error we get that result instantly whenever we want to see while code or whenever 01:51.460 --> 01:57.910 we want to experiment with it we usually use any idea that we can be using at home you can be using 01:57.910 --> 01:58.790 by John. 01:59.200 --> 02:04.930 So basically whenever you are testing whenever you are practicing you might be using one of the active 02:04.950 --> 02:09.060 shell like whenever you are writing some serious code that you want to see. 02:09.190 --> 02:15.580 You might be using editor and this whole notion of both these is our Jupiter notebook that we'll be 02:15.580 --> 02:17.140 discussing in the next lecture. 02:17.590 --> 02:23.140 But now let us focus on a bite on to getting to bite on Shell. 02:23.140 --> 02:27.130 We usually write Python together and do I bite on shells. 02:27.160 --> 02:32.850 We just tried a python that's done you and inside do a bite on it. 02:32.880 --> 02:39.210 One important thing is you might be seeing an indication of this line number that you don't see the 02:39.210 --> 02:40.760 direct my attention. 02:40.780 --> 02:42.590 Now let me import my bind does 02:46.350 --> 02:47.570 fine us is important. 02:47.570 --> 02:54.880 Now let me create a data frame so far that I would be digging a variable as the F1 and I need to call 02:54.890 --> 03:00.560 my nose and inside that I would be using data from inside that we need to boss. 03:00.560 --> 03:06.210 I got a list display or any file so I wouldn't be passing a basic list. 03:06.290 --> 03:11.740 You can understand it as a way off a table in which the first few list for date. 03:11.780 --> 03:13.760 The second field is for visitor. 03:13.760 --> 03:16.250 And the third field is for bone straight. 03:16.310 --> 03:20.240 And remember I'm going to boss this with the help of a list. 03:20.450 --> 03:25.670 So I'm going to pass a list inside that I would be passing these items. 03:25.670 --> 03:27.910 So the first I need to pass as these. 03:27.920 --> 03:33.530 So let me talk about maybe five these then I need to bus number of his dead. 03:33.560 --> 03:37.400 I would be counting it as 5000 and then my bone. 03:37.550 --> 03:39.070 So that is 20. 03:39.560 --> 03:43.660 If I need to pass one more rule I have to repeat the same step. 03:45.410 --> 03:52.070 Maybe this time I'm taking the day off or doing days and the number of visitors are nine thousand eight 03:52.070 --> 03:54.020 hundred and then the voluntary. 03:54.140 --> 03:58.370 So once your data is entered all you have to lose presenter. 03:58.370 --> 04:01.520 Now we haven't stored our data inside our data frame one. 04:01.520 --> 04:03.470 That is our variable D of one. 04:03.590 --> 04:05.410 Let me check that out. 04:05.410 --> 04:08.490 Now you can see in the output I am getting a matrix. 04:08.510 --> 04:16.280 You can see a row or column field so this is my column and this is my row so my column 0 has number 04:16.280 --> 04:21.420 of days and my column 1 has a number of visitors and then my column blue. 04:21.430 --> 04:24.520 That is my bounce rate and these are my indexes. 04:24.530 --> 04:25.820 That is my rules. 04:26.180 --> 04:32.450 So you can see these are just exactly in the line five five thousand twenty four five five thousand 04:32.450 --> 04:37.610 twenty and then ten nine thousand eight hundred twenty three ten nine thousand eight hundred twenty 04:37.610 --> 04:38.190 three. 04:38.190 --> 04:43.430 So these are some type of sequence Don't worry we are going to deal with a lot more data. 04:43.430 --> 04:45.530 This was a basic sample. 04:45.530 --> 04:49.370 Now I can also rename these C instead of 0 1 and 2. 04:49.400 --> 04:54.490 I can actually rename them as number of days visitors and boundary. 04:54.950 --> 04:57.790 Let me try that software first argument. 04:57.800 --> 04:59.600 That is your complete list. 04:59.600 --> 05:03.780 Use a comma and then you have to boss a barometer ask column. 05:03.890 --> 05:07.310 Then again a list and then the three item name. 05:07.310 --> 05:09.550 Let me add these three item. 05:09.560 --> 05:11.470 I would call it as D. 05:11.680 --> 05:13.760 And the second item is visitors. 05:13.760 --> 05:15.510 And the third item is bounty. 05:15.560 --> 05:18.080 I would call it as we are in the short form. 05:18.080 --> 05:18.770 This looks fine. 05:18.770 --> 05:24.390 Look me into and let me bring my data from here. 05:24.390 --> 05:30.480 You can see now I have changed the heading in that is instead of 0 1 2 I now have these ways it does 05:30.540 --> 05:31.810 and bounce straight. 05:31.860 --> 05:33.960 I can also choose the name of indexes. 05:33.990 --> 05:34.910 That is our rules. 05:35.310 --> 05:38.580 So instead of column you will have to use index name 05:41.370 --> 05:42.800 to start a new paradigm. 05:42.840 --> 05:43.860 Dunbar's document 05:50.410 --> 05:55.750 remember usually when we deal with data there are less number of columns but there are more number of 05:55.750 --> 05:58.240 rows like currently we have only two rows. 05:58.300 --> 06:06.010 But what if I am taking beat of hundred of different website or maybe I am taking data 365 days so each 06:06.010 --> 06:09.970 day will have a different rule and then the column would be seen. 06:10.060 --> 06:13.030 That is my day that is my visitor and. 06:13.360 --> 06:15.280 But the rule will be 365. 06:15.760 --> 06:18.570 So it is really hard to give in next to each rule. 06:18.580 --> 06:21.630 That is why we by default big 0 1 2 3. 06:21.670 --> 06:27.820 But it is easy to take column name because they are easily countable and can be name like we enter with 06:27.820 --> 06:29.110 my index. 06:29.300 --> 06:32.890 And let me bring this one. 06:33.010 --> 06:39.310 You can see in all we have and this instead of my 0 and 1 and now we have different column name remember 06:39.310 --> 06:40.760 data for a mass table. 06:40.780 --> 06:47.090 If I take an example of my Excel file that is an exact example of my data frame instead of laying that 06:47.110 --> 06:48.120 my excel file. 06:48.280 --> 06:52.110 I'm taking all the data from my Excel file inside my Python. 06:52.150 --> 06:55.000 That is my I buy it on and then play with it. 06:55.090 --> 06:59.350 The main reason is because you can be dealing with tons of data. 06:59.410 --> 07:01.890 It is just two data points at this point of time. 07:02.020 --> 07:08.350 But then we deal with data that can be off 365 days or maybe some thousand data on maybe I am taking 07:08.350 --> 07:13.180 the dog different listing of what you call must website on maybe a real estate website. 07:13.300 --> 07:19.030 At that one of time you cannot deal with Excel sheet will be dealing with binders. 07:19.030 --> 07:21.440 Also you might be taking the dust from EPA. 07:21.940 --> 07:23.920 So we can directly deal with detail. 07:23.920 --> 07:30.830 EPA is in the form of Jason with the help of find us we'll be doing everything in Japan notebook. 07:30.880 --> 07:35.190 At this point of time this is just to make you comfortable with data frame. 07:35.430 --> 07:41.520 Then we take one more data frame in the form of dictionary and pass the same data and the simpler manner. 07:41.690 --> 07:49.960 If we scroll it up and take our data from as if to get inside my nose and into frame and head inside 07:49.960 --> 07:51.830 that I need to parse the data. 07:51.910 --> 07:57.550 Then my list traditionally look we take my dictionary and when that dictionary I need to pass key and 07:57.550 --> 07:58.180 value it. 07:58.720 --> 08:05.200 So each key would act column and all the values of that key would act as the value of the column. 08:05.560 --> 08:07.010 Let me take the example. 08:07.870 --> 08:15.290 So the first key I need to take is these and head with the value in passing the list and I would be 08:15.290 --> 08:20.300 passing as five and ten because that's the true value I'm taking for these. 08:20.320 --> 08:24.620 Now this again I've done that I'm passing in the missionary is my visitors. 08:24.620 --> 08:30.170 That is my second key and then I need to pass a list in which I would be giving a five telling and nine 08:30.170 --> 08:31.700 thousand eight hundred. 08:31.700 --> 08:33.520 The third I need to pass is beyond. 08:34.100 --> 08:38.820 And then provide a list as twenty and twenty three things looks fine to me. 08:38.840 --> 08:41.670 Let me press into this data frame. 08:41.840 --> 08:43.740 You can see I've got my exact visitor. 08:43.790 --> 08:49.880 This is because I'm bossing directly my additionally head off key and value it. 08:49.910 --> 08:55.220 This one is the easiest one because you have to pass all the data in the one chart in this one whenever 08:55.220 --> 08:59.410 you need to add a neutral all up Lewis Boston row strictly. 08:59.510 --> 09:02.560 That means you just add a comma and pass on your list. 09:02.570 --> 09:08.780 In this one if you need to add more data you have to add a value inside this then this then this then 09:08.770 --> 09:09.950 you are going to get that. 09:10.130 --> 09:11.560 Just get familiar with that. 09:11.690 --> 09:14.610 And then of the day we have to play with files. 09:14.720 --> 09:20.500 I hope by now you are comfortable with data frames and you understand this metrics column and Andrew. 09:20.660 --> 09:22.580 Let us do a small thing. 09:22.580 --> 09:30.240 Let me use type or my data frame hey you can check out Zendesk data for him which is okay. 09:30.390 --> 09:36.810 Now remember at the starting I said that all the operation we need to perform would be done or our data 09:36.810 --> 09:37.830 streams. 09:37.830 --> 09:40.980 Suppose we need project maximum number of visitors. 09:41.250 --> 09:50.260 So all you have to do is use your data stream and then pass the height of value and then your max method. 09:50.310 --> 09:52.870 Here you can see I got nine thousand eight hundred. 09:53.280 --> 09:54.710 Currently we have only two rows. 09:54.720 --> 10:00.750 But suppose it was a data of Konya so we might need to search from 365 days. 10:00.780 --> 10:07.650 Let me check out the mean of these so had I got as 7400. 10:08.460 --> 10:11.700 Let me check our different tables methods and function that I write very well. 10:11.910 --> 10:19.070 So all you have to do is use desired and then buys daydream hey you can see these are different type 10:19.070 --> 10:21.980 of function methods that are available. 10:22.190 --> 10:24.470 What are data from. 10:24.580 --> 10:30.030 I hope by now you understand about data frames in the next lecture we'll be talking about you download 10:30.050 --> 10:32.080 notebook which is something really important. 10:32.710 --> 10:34.430 I hope this lecture was helpful. 10:34.450 --> 10:35.740 See you in the next one.