WEBVTT

00:02.060 --> 00:08.330
Hello, everyone, and welcome to this bitin tutorial here we will understand group by method.

00:09.320 --> 00:10.310
Let us begin.

00:12.110 --> 00:18.110
We use group by method to line up the data together and call aggregate functions on that.

00:18.770 --> 00:26.510
In simple words, we can say that group by function allows us to group together rules based on columns.

00:27.020 --> 00:32.720
And after that, we can perform aggregate operations first import the library reads.

00:36.080 --> 00:39.000
Import numpty as ENPI.

00:40.580 --> 00:42.140
Then import Bendat.

00:45.980 --> 00:49.040
As beedi execute.

00:53.390 --> 00:57.110
Do understand a group by function B, how to define a data frame.

00:57.380 --> 01:01.490
And we will define this data frame on the basis of a dictionary.

01:01.730 --> 01:03.110
So define a dictionary.

01:03.110 --> 01:06.770
First name of the dictionary is deemed data.

01:11.240 --> 01:14.240
Putting the key company.

01:18.400 --> 01:20.320
Then valued as at least.

01:22.060 --> 01:22.780
Apple.

01:25.040 --> 01:25.740
Apple.

01:28.670 --> 01:29.540
Facebook.

01:31.290 --> 01:32.150
Facebook.

01:35.280 --> 01:36.160
Then Google.

01:37.800 --> 01:39.380
And one more time, Google.

01:41.570 --> 01:43.370
No passing one more key.

01:46.080 --> 01:50.160
Person, this is also a list.

01:51.510 --> 01:52.170
Mark.

01:54.920 --> 01:58.700
Dom, John.

02:00.920 --> 02:06.980
Sara, Mia and Emma.

02:08.950 --> 02:09.150
No.

02:09.830 --> 02:24.660
Add one more key value pair key ad sales, then add at least two hundred, 150, 350, 120 for you do

02:24.780 --> 02:26.900
60 180.

02:29.890 --> 02:31.720
That seat execute.

02:35.820 --> 02:39.280
Check this dictionary team data.

02:43.630 --> 02:47.860
Great, in this dictionary, there are three key value pairs.

02:48.100 --> 02:49.180
These are the keys.

02:49.300 --> 02:50.710
And these are the values.

02:52.520 --> 02:54.040
Now, define a data frame.

02:54.080 --> 02:54.350
B.

02:54.410 --> 02:54.830
F.

02:57.060 --> 02:59.430
BD dot data frame.

03:02.860 --> 03:04.410
Specified team data.

03:07.690 --> 03:08.540
Execute.

03:12.690 --> 03:14.730
No, Jake, this data frame the F.

03:18.970 --> 03:24.310
Great, in this data frame, there are three columns and six roads.

03:25.090 --> 03:27.780
No, we can understand the group by function.

03:30.940 --> 03:40.900
Have the name of data from the EFF F, then group by function, specify parameter by.

03:44.000 --> 03:45.020
Bike company.

03:48.920 --> 03:50.900
So this is the group by object.

03:51.110 --> 03:56.920
And it is pointing towards me, Muddy, to get the actual output store.

03:57.020 --> 03:58.640
This is a variable.

04:02.050 --> 04:03.280
Variable be.

04:09.910 --> 04:13.950
Now take BEE and apply aggregate function.

04:14.670 --> 04:15.840
I will apply mean.

04:19.790 --> 04:22.090
So this is the output data.

04:22.160 --> 04:23.620
It's aggregated here.

04:24.990 --> 04:29.460
Total Apple sales, total Facebook sales and total Google sales.

04:30.270 --> 04:32.670
We can apply other aggregate functions.

04:32.950 --> 04:33.450
Also.

04:36.480 --> 04:40.430
Type variable B, now use some.

04:45.290 --> 04:46.450
This is the output.

04:49.910 --> 04:52.340
Let's see one more aggregate function.

04:54.110 --> 04:56.970
SDD, this is for standard deviation.

05:00.670 --> 05:01.200
Great.

05:02.060 --> 05:05.150
We can apply this function for a specific company.

05:05.210 --> 05:07.820
Also, let us see how.

05:10.580 --> 05:23.670
A variable, B, not aggregate function some then dot a low, C, specify a company, Apple.

05:27.550 --> 05:30.550
So this is the output for this specific company.

05:30.730 --> 05:33.490
Apple sales 350.

05:37.510 --> 05:40.300
We can do all these operations in one lane.

05:40.500 --> 05:50.900
Also, let us see how the name of the data framed D.F. then grew by function grew by.

05:50.920 --> 05:52.600
On the basis of company.

05:56.940 --> 06:00.180
He added, We can use aggregate function some.

06:02.840 --> 06:03.590
Execute.

06:05.340 --> 06:08.040
So this is the result we can add.

06:08.070 --> 06:09.630
Company name also.

06:12.120 --> 06:12.950
F b..

06:16.570 --> 06:18.020
So this is a very adult.

06:18.820 --> 06:22.270
So this way we can perform all the operations in one lane.

06:22.390 --> 06:23.050
Also.

06:26.830 --> 06:29.250
Let us see other aggregate functions.

06:30.000 --> 06:32.780
B, dot count.

06:38.540 --> 06:40.540
This function returns the count.

06:41.090 --> 06:45.560
There are two person in Apple, two in FBI and two in Google.

06:45.740 --> 06:48.980
And there are total two to two values of sales.

06:54.360 --> 06:58.030
Baby Dot Max.

07:04.280 --> 07:07.400
So these are the maximum values of each company.

07:08.390 --> 07:10.190
And these are deep person names.

07:13.890 --> 07:19.110
In similar vein, we can apply in function, be dort mean.

07:24.330 --> 07:28.170
These are the minimum values of taels for each company.

07:29.250 --> 07:32.570
Let us understand one more function with group by method.

07:44.350 --> 07:46.300
Group by method describe.

07:56.490 --> 07:57.090
First to use.

07:57.180 --> 07:58.350
Group by method.

07:58.860 --> 08:00.040
B f dot.

08:01.980 --> 08:02.820
Group by

08:05.740 --> 08:08.130
barometer by is equal to company.

08:10.800 --> 08:14.190
Then God describe.

08:21.020 --> 08:29.780
So this is the output in this output v. count mean standard deviation, minimum value, first quartile,

08:29.780 --> 08:33.350
second quartile, third quartile and maximum values.

08:34.190 --> 08:36.200
We can get transfers of that.

08:37.480 --> 08:38.800
Let us see how.

08:41.280 --> 08:44.790
Based dot dance booths.

08:52.100 --> 08:53.520
So this is the transports.

08:54.260 --> 08:59.390
So these are the values cound mean standard deviation minimum.

08:59.930 --> 09:07.040
These are the three quartiles first, second and third, and then maximum values we can use to describe

09:07.040 --> 09:09.860
function on the basis of a single company.

09:09.980 --> 09:19.150
Also, let us see how Paiste then Dot Alosi enter name of the company.

09:23.940 --> 09:25.370
And this is our output.

09:25.620 --> 09:31.530
All the values on the basis of company F B, so despite and ditto the NCA.

09:33.230 --> 09:36.120
Let us revise what we have learned in this ordeal.

09:37.440 --> 09:45.060
First, we have defined A data frame B F and we have defined this data frame on the basis of a dictionary.

09:45.240 --> 09:45.900
This one.

09:48.370 --> 09:52.750
After that, we help understood aggregate functions with group by function.

09:53.530 --> 09:56.570
This is our first aggregate function mean.

09:57.670 --> 10:06.370
Then we help understood some standard deviation and other functions like Cound, Max and Min.

10:07.000 --> 10:14.180
And at the end, V.L. understood group by method with described function described function returns.

10:14.290 --> 10:15.430
All these values.

10:18.100 --> 10:21.560
So this patented Odille Ungrouped by Method NCEA.

10:21.940 --> 10:24.710
I will see you in the next one, will then.

10:24.940 --> 10:25.980
Happy learning.
