WEBVTT

00:02.070 --> 00:09.060
Hello and welcome to Deterred by tinted ordeal on data frames he had with Villone multi index and index

00:09.060 --> 00:09.810
hierarchy.

00:09.990 --> 00:13.230
Let us begin first import deliberated.

00:16.890 --> 00:22.020
Great after that, define a least outside.

00:25.030 --> 00:28.990
InterCloud read two more times.

00:32.060 --> 00:36.770
Then enter color green three times.

00:42.980 --> 00:46.390
They find one more liste inside.

00:49.280 --> 00:53.570
One, two, three, again, one, two, three.

00:54.460 --> 00:55.280
Execute.

00:56.370 --> 00:56.970
Great.

00:58.380 --> 01:00.190
Now define a variable.

01:02.820 --> 01:05.520
Higher index in this variable.

01:05.580 --> 01:11.610
We're going to store a list in that list, zip function.

01:14.820 --> 01:17.910
And deep barometers outside and inside.

01:20.160 --> 01:20.850
Execute.

01:24.190 --> 01:26.790
Now, take this variable here.

01:26.890 --> 01:27.550
Index.

01:34.110 --> 01:34.710
Great.

01:35.220 --> 01:37.230
So this is a list of people's.

01:40.530 --> 01:49.630
Using that stuffed up, well, today will define a multi index, define a variable multi index is equal

01:49.680 --> 01:53.850
to BD Dot Multi Index.

01:56.300 --> 01:59.420
Dort from double's.

02:02.460 --> 02:05.060
Inter barometer as higher index.

02:08.280 --> 02:10.800
Then one more parameter names.

02:13.310 --> 02:14.000
Gullahs.

02:17.030 --> 02:17.760
And number.

02:23.200 --> 02:24.940
Now, take this multi index.

02:30.210 --> 02:30.870
Great.

02:31.590 --> 02:34.680
So this is the multi index that we have defined here.

02:35.310 --> 02:38.570
Now using that multi index, define a data frame.

02:41.180 --> 02:46.080
B, F, bd dot data frame.

02:47.870 --> 02:50.000
First, we have to specify the data.

02:50.960 --> 02:54.170
Data is equal to that end and.

02:57.140 --> 03:04.090
And in parentheses, six comma, two six rows and two columns after that specify.

03:04.270 --> 03:04.940
Index.

03:06.960 --> 03:09.210
Index is equal to multi index.

03:12.480 --> 03:14.550
And at the unspecified columns.

03:21.020 --> 03:22.100
A and B.

03:27.110 --> 03:29.180
Now, take this data out from the F.

03:32.160 --> 03:32.790
Great.

03:33.540 --> 03:36.120
So this is a multi index data frame.

03:36.840 --> 03:38.620
This is the index level one.

03:39.240 --> 03:42.390
This one, the red and green, this column.

03:42.810 --> 03:44.180
And this is the index level.

03:44.220 --> 03:47.280
Second one, two, three, one, two, three.

03:48.090 --> 03:51.660
Let us understand how we how defined a multi-level data frame.

03:51.960 --> 03:52.860
Scroll up.

03:55.900 --> 03:57.980
First view, how important the libraries.

03:58.600 --> 04:02.470
After that, we help, we find to list outside and inside.

04:03.050 --> 04:06.040
Then using this list to be how do we find a variable?

04:06.190 --> 04:07.270
Higher index.

04:07.360 --> 04:09.290
This one, a list of doubles.

04:10.120 --> 04:13.570
And using this list of doubles, we have defined multi index.

04:15.130 --> 04:18.410
And Vedette Multi Index, we have defined a data frame.

04:18.740 --> 04:24.440
Be index data, frame this one, index level one and index level two.

04:24.560 --> 04:26.460
And this is data data.

04:26.600 --> 04:32.950
In column A and B, let us understand how to call the data from multi index data frame.

04:36.220 --> 04:44.190
By the name of data frame B, F dot a low, C specify index.

04:44.940 --> 04:45.390
Read.

04:48.290 --> 04:50.440
So this is the output here.

04:50.510 --> 04:53.820
We have specified level one index that is read.

04:53.990 --> 04:57.370
And this is the output in level one index grade.

04:58.100 --> 04:59.630
There is level two index.

04:59.690 --> 05:06.290
And this data, let us understand how to select level two index type dot Alosi.

05:07.970 --> 05:12.350
Specify indexed level to execute.

05:13.640 --> 05:14.240
Great.

05:14.780 --> 05:19.190
So this is the data from index level to to get that data.

05:19.550 --> 05:20.640
We have to specify.

05:20.670 --> 05:21.950
Index level one.

05:22.220 --> 05:25.900
And then we have to specify index level to like these.

05:26.540 --> 05:28.850
And after that, we can grab a column.

05:28.940 --> 05:32.150
Also column A.

05:35.230 --> 05:35.830
Great.

05:36.490 --> 05:40.350
So this is how we can call the data from multi index data frame.

05:41.880 --> 05:43.770
Let us see one more example.

05:44.790 --> 05:47.460
The F Dot LLC.

05:51.380 --> 05:53.350
Index level one is green.

05:55.840 --> 05:58.660
Great Dane Dart, LLC.

05:59.850 --> 06:02.400
We will grab these two.

06:06.570 --> 06:10.920
So this is the output from index level one and index level two.

06:11.550 --> 06:13.890
Now grab the data from Colombe.

06:19.400 --> 06:21.980
Zero point seven for this one.

06:22.850 --> 06:25.160
So this is all about grabbing data.

06:28.070 --> 06:28.600
No check.

06:28.650 --> 06:30.810
The index stays in this data frame.

06:31.410 --> 06:36.650
The F dot index dot names.

06:41.780 --> 06:43.220
Colors and numbers.

06:45.300 --> 06:46.650
Colors and numbers.

06:46.830 --> 06:48.720
These two are the indexes.

06:51.260 --> 06:53.090
We can change these indexes.

06:53.600 --> 06:57.560
Let us see how Kopit is based.

06:58.340 --> 07:01.290
Is equal to specify a list.

07:02.630 --> 07:03.200
C o.

07:03.290 --> 07:03.620
L.

07:04.280 --> 07:06.110
That is four color and.

07:06.200 --> 07:06.750
And you.

07:06.870 --> 07:08.680
And that is four numbers.

07:14.740 --> 07:16.510
Take the data from D.F..

07:18.670 --> 07:19.300
Great.

07:19.870 --> 07:24.500
So here we have successfully changed the index's call and name.

07:24.680 --> 07:27.160
Previously it was colors and numbers.

07:28.030 --> 07:30.400
So this way we can change the indexes.

07:34.770 --> 07:40.380
Let us understand a function for might be index cross section.

07:44.810 --> 07:45.780
Take the data out for him.

07:45.870 --> 07:46.490
B f.

07:50.240 --> 07:54.640
So this is our data frame to grab the level one index trade.

07:54.920 --> 07:58.060
We use a Locy method like this.

07:58.280 --> 07:58.550
B.

07:58.610 --> 07:59.410
F dot.

07:59.670 --> 08:00.410
A, Locy.

08:01.460 --> 08:04.850
And then index level one read.

08:08.290 --> 08:09.550
And this is the output.

08:12.360 --> 08:24.090
We can do the same with cross-section function type D.F. dot X s and in parentheses index name read.

08:27.900 --> 08:29.010
Same output.

08:29.550 --> 08:33.710
So this is the cross-section function in cross-section function.

08:33.750 --> 08:35.880
We can't specify other parameters.

08:35.970 --> 08:36.630
Also.

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

08:42.160 --> 08:51.190
So these are the parameters that we can specify key axes, level and drop level, specify key is equal

08:51.190 --> 08:51.940
to one.

08:54.020 --> 08:55.860
And level is equal to number.

08:58.810 --> 08:59.550
Execute.

09:01.180 --> 09:01.750
Great.

09:01.990 --> 09:03.310
So this is the output.

09:03.910 --> 09:05.500
Let us understand this output.

09:06.210 --> 09:08.980
We have specified key is equal to one.

09:09.850 --> 09:11.290
This one Vun.

09:12.400 --> 09:19.400
In the data frame we have given is two times in index grade and in index green.

09:20.020 --> 09:24.530
And after that we have specified the level of this key, which is now.

09:26.800 --> 09:29.740
Key and level, and this is the output.

09:30.370 --> 09:38.200
So here we have selected all the data under key one and level number so we can say that the cross-section

09:38.230 --> 09:42.910
function has the ability to go inside the multi level index.

09:43.480 --> 09:48.880
As you can see here at a time, we have selected all the data from Key VUN.

09:49.330 --> 09:53.110
This is the ability to go inside the multi level index.

09:54.010 --> 09:56.890
In this tutorial, we have learned a lot of things.

09:57.940 --> 09:58.990
Let us vides.

10:00.810 --> 10:02.490
Data frames part three.

10:03.130 --> 10:05.970
First, we have defined a multi level index.

10:06.090 --> 10:06.780
This one.

10:07.290 --> 10:11.580
And we have defined this multi level index from a list of double's.

10:12.640 --> 10:18.130
After that, we have defined a data frame, multi-level data frame this one.

10:18.670 --> 10:23.260
There are two levels in this data frame, level one and level two.

10:23.950 --> 10:28.540
And after that, we help understood how to grab the data from multi level data frame.

10:30.330 --> 10:32.220
To do that, we use this method.

10:32.430 --> 10:37.680
Doc Alosi method, then we help understood how to change the indexes.

10:39.670 --> 10:42.960
And at the end, V.L. understood cross-section function.

10:44.330 --> 10:51.370
This one dot, it's as so despite Antigo deal on data frames, part three NCEA.

10:51.830 --> 10:53.710
I will see you in the next one.

10:54.020 --> 10:55.850
buildOn Happy learning.
