WEBVTT

00:00.870 --> 00:06.020
Might it come to the solution for coding exercise one in this and the next exercises.

00:06.020 --> 00:13.510
We will deeply analyze the listings dataset that contains all current stock listings on the three major

00:13.510 --> 00:15.040
US stock exchanges.

00:15.050 --> 00:19.950
The New York Stock Exchange Nasdaq and American Stock Exchange.

00:20.120 --> 00:27.550
And let's start with the question one import penned us and by convention we import pandas SPDR.

00:28.220 --> 00:33.700
So let's run the sell here and then as a next step we want to import.

00:33.720 --> 00:39.700
Uh the listing state asset from the U.S. as we file listings that to see a three.

00:40.070 --> 00:46.880
And we can do this by passing the file name listing stud CSP strings or within quotation marks here

00:47.510 --> 00:50.420
to the read CSP method.

00:50.420 --> 00:56.600
And by doing so we creating a panel state of frame and we save the data frame and the variable listings

00:59.060 --> 01:03.340
and then as a very first step it is always useful to inspect.

01:03.360 --> 01:09.500
Uh the first uh 5 4 10 rows and we can do this with uh the head method.

01:09.500 --> 01:15.370
So here we pass uh tend to the head method to inspect the first 10 rows.

01:15.470 --> 01:19.640
The default setting is here the first five rows.

01:19.740 --> 01:21.250
Let's have a look here.

01:21.420 --> 01:24.630
And the question is uh what is the company name of.

01:24.680 --> 01:28.330
The very first listing in the first row.

01:28.400 --> 01:29.660
So let's have a look at the.

01:29.670 --> 01:30.730
The very first row.

01:30.740 --> 01:34.790
And the company name and that's Agilent Technologies.

01:35.240 --> 01:35.940
And uh.

01:35.960 --> 01:37.270
We are right here.

01:37.520 --> 01:39.640
Then here we have the fourth question.

01:39.650 --> 01:41.870
Also inspect the last five rows.

01:42.110 --> 01:45.930
And we can do this of course with the tail method.

01:46.010 --> 01:50.000
So the default setting is that we have the last five rows.

01:50.390 --> 01:54.730
So here we do not have to pass an argument with the empire in meta.

01:54.800 --> 01:57.010
And uh that's run the sale here.

01:57.770 --> 02:02.070
And the question here is how many listings are those do we have in the data set.

02:02.390 --> 02:06.770
And we should mind that we have a range and next starting from zero.

02:07.250 --> 02:13.280
So in total we have uh six thousand eight hundred fifty two listings.

02:13.280 --> 02:19.700
Next that might be useful to get some meta information in our data frame and that we can do this with

02:19.790 --> 02:27.770
the info method and the question is and which columns do we have a missing or any end value.

02:28.050 --> 02:32.010
So here we can see the number of none other values.

02:32.010 --> 02:36.160
So in total we have six thousand eight hundred fifty two rows.

02:36.270 --> 02:44.520
And obviously we have the missing values in the column last price the market cap ADR T S O IP year sector

02:44.550 --> 02:45.800
and industry.

02:46.470 --> 02:53.040
And finally we also get some summary statistics in our data frame and we can do this with the you describe

02:53.110 --> 03:00.080
mass at and the question here is what is the maximum value in the column last price.

03:00.140 --> 03:09.110
So let's go to the column last price and the maximum is here about four thousand three hundred so that

03:09.110 --> 03:11.800
was a very first inspection of the list things.

03:11.800 --> 03:17.960
The dataset and we can ask for more closer look here to the columns.

03:18.590 --> 03:25.060
So we have the column symbol and a stock ticker symbol is an abbreviation used to a uniquely identify

03:25.100 --> 03:27.320
publicly traded shares.

03:27.560 --> 03:30.860
And then we have for the next column exchange.

03:31.040 --> 03:35.150
And that's simply the marketplace in which the shares are traded.

03:35.330 --> 03:41.140
And here in our example we have the New York Stock Exchange and the Nasdaq and Amex.

03:41.300 --> 03:44.600
Then next we have the legal company name.

03:44.600 --> 03:49.220
Then the last trading price as of April 2000 and 19.

03:49.730 --> 03:54.170
So I extracted the data set here in April 2019.

03:54.680 --> 04:02.480
And also the market capitalization sets of April 2019 and the market cap is simply the dollar value

04:02.480 --> 04:09.340
of outstanding shares and can be actually computed as shares times the current price then we have for

04:09.350 --> 04:14.720
the additional column ADR TSR though and this includes some additional information on foreign stocks

04:14.720 --> 04:16.210
trading in the US.

04:16.430 --> 04:21.230
And then we have the IPO year so the year of the initial public offering.

04:21.230 --> 04:27.590
And then finally we have some information on the sector and the industry of the main business activity

04:27.590 --> 04:31.790
of the company is so that's the listing State asset.

04:31.810 --> 04:34.720
And I hope to see you also in the next exercises by.
