WEBVTT

00:01.030 --> 00:08.160
Welcome to the solution for coding exercise 7 and of import pen us and also the listings clean CSP fire

00:10.500 --> 00:17.730
and then we thought the listings that are framed by the IPO year column from old to new and then we

00:17.730 --> 00:20.680
reset the index and create a new Range Index.

00:20.730 --> 00:21.860
Starting from zero.

00:21.870 --> 00:30.470
So let's have a look here so here we have our listings sorted by the IPO year starting with the listings

00:30.600 --> 00:36.780
before nineteen hundred seventy and before we can create plots we have to import them at plot lip as

00:36.920 --> 00:39.860
appeared here and as a matter of taste.

00:39.900 --> 00:49.970
We use the Seabourn style by passing Seabourn to the method style that use and now the very first task

00:49.970 --> 00:51.360
is easier to create.

00:51.570 --> 00:58.860
The airline plot below and obviously this this airline plot organized as subplots and on the left hand

00:58.860 --> 01:03.570
side we can see here that the y axis has different scales.

01:03.630 --> 01:12.450
So on the last price column from 0 to 4000 then add the market cap column from 0 to pretty high here

01:12.990 --> 01:17.740
and in the IPO Yeah column from nineteen hundred seventy to 2020.

01:17.820 --> 01:25.230
And we can create these plots here by using the plot method and passing through to these subplots pair

01:25.230 --> 01:32.580
meta and for each and every subplot we have a separate sexes and therefore we pass also falls through

01:32.580 --> 01:39.300
these share X parameter and the default parameter for share Y is also false.

01:39.300 --> 01:47.550
So this is I got here and we determined to have a fixed size of 15 15 and we create a let's add.

01:47.570 --> 01:51.670
And finally we shouldn't forget to call P T data show.

01:51.870 --> 01:53.700
So let's have a look here.

01:54.090 --> 01:57.370
And uh the seer looks pretty good actually.

01:57.690 --> 02:05.910
Next we have to create a histogram for the last price column with 200 pins and we only have to select

02:05.910 --> 02:10.510
the listings with the last price smaller than 200.

02:10.620 --> 02:17.000
So that's the graph that we should create here and therefore we filled our listings data frame and to

02:17.010 --> 02:20.770
select only rows where the last price is smaller than 200.

02:21.030 --> 02:28.830
Then we can you see the highest method to create a histogram and we pass that 200 to the pins parameter.

02:28.830 --> 02:36.420
And finally we can also create a tighter last price frequency to see Putin then a label for the x axis

02:36.420 --> 02:41.180
price a label for the y axis frequency.

02:41.280 --> 02:49.190
And finally of course we call purity that so and that looks pretty good here.

02:50.560 --> 02:58.270
Now we the next exercise you have to create a scatter plot with the last price on the sexes market cap

02:58.270 --> 03:02.510
on the y axis and the IPO year is color.

03:02.680 --> 03:09.640
So let's have a look here at our code and again we use the plot method and we pass the scatter for scatter

03:09.640 --> 03:17.190
plot to the kind parameter and we pass the column last price to the expire meter end market cap to the

03:17.200 --> 03:18.450
White perimeter.

03:18.760 --> 03:24.560
And finally we pass the IPO year column to the color power meter.

03:24.610 --> 03:32.540
And finally we also add a title and labels for the X and the y axis.

03:32.590 --> 03:34.570
So this is that the graph here

03:37.410 --> 03:38.480
and next.

03:38.520 --> 03:46.320
We will create some seaborne plots and therefore first of all we import seaborne S S and S so that s

03:46.440 --> 03:47.610
the convention here

03:50.770 --> 03:56.020
and then first of all we create a counter plot and it should show the number or the count of listings

03:56.020 --> 04:00.370
per exchange per IPO year starting from 2001.

04:00.370 --> 04:02.540
So that's the graph here.

04:02.650 --> 04:07.510
And first of all we can set a figure size that with a pure dealer figure.

04:07.510 --> 04:10.660
And uh then we can create a count plot.

04:10.940 --> 04:16.880
This uh seaborne dot com plot and we pass our listing stellar frame.

04:16.900 --> 04:22.770
And actually here we have a field at Virgin so we filled our listings data frame only for listings with

04:22.780 --> 04:29.950
IPO year later than 2000 and then we pass the IPO year to the x axis.

04:29.950 --> 04:36.190
So here we are on the x axis that we have the IPO year and for each and every IPO year we differentiate

04:36.190 --> 04:38.530
between the exchanges.

04:38.590 --> 04:45.610
So yeah area for each and every year the number of IPOs for Nasdaq and New York Stock Exchange and Amex

04:46.270 --> 04:52.480
and we can split this up by passing the Exchange column to the Hugh perimeter.

04:52.540 --> 04:54.340
So let's run the sell here

04:59.320 --> 05:01.890
next we have to create the following plot.

05:01.900 --> 05:08.020
And this is a bomb plot and we should answer the question whether the lower market cap of stocks being

05:08.020 --> 05:11.970
Amex listed as statistically insignificant.

05:12.010 --> 05:14.910
So this is a seaborne bomb plot.

05:15.190 --> 05:21.910
And then we pass our listings data frame to the data parameter and on the exact source here we have

05:22.000 --> 05:23.560
the exchanges.

05:23.560 --> 05:25.060
And on the y axis.

05:25.150 --> 05:27.030
The market cap column.

05:27.250 --> 05:29.380
So let's create the plot here

05:32.800 --> 05:36.150
so here we are for the average market capitalizations.

05:36.220 --> 05:43.900
For the listings on Nasdaq nicely and Amex and he and black you can see kind of a confidence interval.

05:44.350 --> 05:51.220
And here we have the confidence interval for the Amex listings and the seems to be significant that

05:51.310 --> 05:56.490
listings on the Amex have on average a lower market cap.

05:56.510 --> 05:59.150
Here we shall impart the matrix 1.

05:59.190 --> 06:03.090
See as we file and let's do this here.

06:03.500 --> 06:13.810
Let's have a look so here we have a matrix with the IPO year index and these sectors as a column labels

06:14.920 --> 06:20.860
so for example there are eight companies active in the capital goods sector that had the IPO in the

06:20.860 --> 06:24.250
year nineteen hundred ninety three.

06:24.460 --> 06:32.390
So that's the Matrix the data frame here and now we have to create the following seaborne heat map by

06:32.510 --> 06:42.350
passing the matrix one data frame to the heat map method so we have as a net start heat map then you

06:42.350 --> 06:49.250
pass matrix 1 and as a color map we use we this and the v Max is 25.

06:49.250 --> 06:50.410
So let's have a look here

06:53.680 --> 06:59.990
and here we can see on the right hand side the color scale from 0 IPO is to 25 IPOs.

07:00.110 --> 07:03.290
So a yellow color marks the hot sectors.

07:03.400 --> 07:12.940
And for example in the U.S. The 230 into 218 we have more than 25 IPOs in the healthcare sector and

07:12.940 --> 07:20.400
also quite a lot in the finance sector and in the consumer services sector and also in the tech sector.

07:20.440 --> 07:24.870
So that's actually the hot sectors in the most recent years.

07:25.490 --> 07:25.960
All right.

07:25.960 --> 07:30.160
And with this we are finished here and I hope to see also in the next exercise by.
