WEBVTT

00:00.670 --> 00:03.070
Welcome to the solution for coding exercise.

00:03.080 --> 00:08.450
Three and we have already imported pandas and also the list.

00:08.590 --> 00:09.820
CSB file.

00:10.600 --> 00:16.870
And here in question 19 we should select the numerical column last prize and create a copy and save

00:16.900 --> 00:20.720
the copy the panda series and the variable prize.

00:20.710 --> 00:22.300
And this is pretty simple.

00:22.300 --> 00:30.040
So we selected the last price column and we change the copy method to create an independent object and

00:30.310 --> 00:33.450
we save the independent object and the rabbit prize

00:37.460 --> 00:40.940
then next we should get some summary statistics on the prize.

00:41.090 --> 00:44.500
And of course we can do the service of the described method.

00:45.290 --> 00:50.150
And the question is here what is the price of the most expensive stock and therefore we have to look

00:50.150 --> 00:54.060
here at the maximum here in the next question.

00:54.060 --> 00:56.730
We should get the minimum value in our price.

00:56.740 --> 01:04.860
The panacea is by calling the respective method and of course the method as the main method.

01:04.860 --> 01:07.700
And the question is what is the cheapest stock price.

01:07.710 --> 01:16.710
And it's actually 0 point 0 0 3 dollars then in question 22 we have to get the frequency is in our price

01:16.890 --> 01:20.760
column and we can do this with the value counts method.

01:23.250 --> 01:26.370
And the question is here what are some of the most frequent price.

01:26.370 --> 01:30.790
And obviously it's a nine point seventy three and twenty five.

01:31.140 --> 01:39.770
So we have for both prices 9 occurrences so that were the absolute frequencies and we should also get

01:39.770 --> 01:47.060
the relative frequencies and uh we can simply do this by also using every value counts method and pass

01:47.230 --> 01:49.310
through to the normalized parameter

01:53.220 --> 02:03.420
and it's no surprise here that we get the pretty small numbers here so 0 point 1 3 percent actually.

02:03.530 --> 02:06.890
Here we have to sort of a price series from low to high.

02:07.310 --> 02:11.130
And we can do the service of the sort value method.

02:11.570 --> 02:19.640
And the second lowest price this year 0 point 0 for so that was the sorting from low to high.

02:20.010 --> 02:27.600
And now we have to sort the the price series from high to low and we have to pass the falls to the ascending

02:27.600 --> 02:30.770
power meter to get in descending order.

02:31.470 --> 02:36.630
And also we have to save for the changes by setting the in-place prior meter to true.

02:37.140 --> 02:41.430
So we pass your true to the in-place power meter and by doing so we actually.

02:41.450 --> 02:42.510
Oh right.

02:42.530 --> 02:49.730
Um the object that a start in the variable price with uh these starting here from high to low.

02:50.220 --> 02:53.390
And let's inspect our written object.

02:53.910 --> 02:57.120
So we are face starting from high to low.

02:57.120 --> 03:03.120
So these are the first five elements and obviously the second highest prices are two thousand nine hundred

03:03.150 --> 03:03.960
and ten

03:06.610 --> 03:13.450
and here we have to sort our pandas serious by the index in ascending order and we have to save for

03:13.480 --> 03:19.180
overwrite the changes and we can do this the rest of the thought index method and the default setting

03:19.180 --> 03:21.190
is an ascending order.

03:21.190 --> 03:26.920
And also here we have to pass through to the in-place power meter to save the change and to override

03:26.920 --> 03:35.870
the object here so again here we have our panacea series sorted by the arranged index from low to high

03:37.560 --> 03:39.770
then and the next step we shall select.

03:39.870 --> 03:47.250
The non numerical column sector and also here we create a copy and we save uh The Pen are serious and

03:47.250 --> 03:48.290
the variable sector.

03:48.600 --> 03:50.120
So let's have a look here.

03:50.220 --> 03:52.800
That's the first five elements here.

03:52.800 --> 03:58.570
For example capital got sloppy basic industries and then we have to use the described method.

03:58.580 --> 04:04.600
Also on the non numerical serious and the questionis the models are the most frequent.

04:04.590 --> 04:10.370
The value sector and obviously here it's the finance sector.

04:10.370 --> 04:16.430
Then next year in question 29 we should get all unique values in the serious sector.

04:16.430 --> 04:17.690
So let's have a look here.

04:19.960 --> 04:25.230
And last but not least we have to count the frequencies and uh the serious sector.

04:25.570 --> 04:29.910
And the question is how often does the value of the sector transportation appear.

04:30.040 --> 04:33.730
And of course we can U.S.A also the value accounts method

04:36.670 --> 04:44.380
so we we have the absolute frequencies for our sectors and we have in total 123 companies that are active

04:44.380 --> 04:46.930
in the transportation sector.

04:46.930 --> 04:47.320
All right.

04:47.320 --> 04:49.010
That was Exercise 3.

04:49.060 --> 04:53.320
I hope you had fun and looking forward to see you also on the next exercise by.
