WEBVTT

00:01.510 --> 00:02.620
Hi and welcome back.

00:02.620 --> 00:07.670
So in this video we continue our first inspection of our Titanic dataset.

00:07.900 --> 00:11.200
So in the last video we print out our whole dataset.

00:11.800 --> 00:17.080
However with the large dataset with many rows it doesn't make sense to print the whole dataset.

00:17.530 --> 00:24.180
And in most cases to get a very first good impression it's enough to have a look at the first five rows.

00:24.190 --> 00:32.050
And the last five rows for example and therefore there are two very hard four methods here.

00:32.050 --> 00:41.230
So first of all we have the head method and that's press shift type here.

00:41.410 --> 00:48.110
So the happy method returns to the first end rows of our data frame and by default the parameter end

00:48.120 --> 00:49.060
is set to five.

00:49.060 --> 00:54.970
But yeah we can change it but now for the time being let's try it here with them the default parameter

00:56.060 --> 01:03.380
and we can see here now our very first five rows of our data frame and we can pass different values

01:03.380 --> 01:04.210
to our parameter.

01:04.220 --> 01:12.830
And so for example if you want to have a look at the first 10 rows we can set end to 10 and then we

01:12.830 --> 01:14.430
get the first 10 rows.

01:14.480 --> 01:21.710
If it's enough to get only the first two rows and then we can pass to.

01:21.800 --> 01:28.040
So now we know the very first rows and in combination with the the very last draws of our data frame.

01:28.070 --> 01:36.020
So this typically gives us a very good overview over the dataset and we can call the very last throws

01:36.050 --> 01:37.730
this then the Taylor method

01:42.640 --> 01:45.740
so by default the tail method returns.

01:45.790 --> 01:50.550
The last end rows and NASA set by default to 5.

01:50.560 --> 01:57.460
But we can change also this year and let's say we want to have the last 10 rows and we got the last

01:57.460 --> 02:05.220
10 rows and you can see here with the help method and also the tail method we can see here the column

02:05.220 --> 02:09.270
labels and we can also explicitly call our column labels

02:12.130 --> 02:14.350
with the attribute columns

02:17.910 --> 02:20.080
and we get a so-called index object.

02:20.100 --> 02:27.780
So it looks like a list of this on the column labeled slow survived P Class 6 it's the best P Podge

02:27.790 --> 02:35.780
fair embarked Imtech and we can also explicitly call our row labels here on the left side

02:39.020 --> 02:41.540
with the attribute top index

02:44.450 --> 02:49.750
and we can see that we have a so-called Range Index so starting from zero until eight hundred ninety

02:49.750 --> 02:57.480
one and eight hundred and ninety one excluding so we was started with a zero until eight hundred ninety

02:57.950 --> 03:06.060
and this is a so-called Range Index and that's a very helpful method called in for where we can get

03:06.060 --> 03:16.310
made our data on our data frame so let's try this one here so that in for and here we get meta information

03:16.310 --> 03:22.360
on our data frame so for example here you can see that it's a data frame and that we have a Range Index

03:22.370 --> 03:32.640
with 891 entries from zero to 890 and we see that we have in total nine columns and here we have them

03:32.650 --> 03:39.070
the labels of the columns so survived the passenger class onto the deck and here we can see the amount

03:39.070 --> 03:45.430
of non null null values so typically in the data set they are missing value as are so called No values

03:46.460 --> 03:49.930
And here we get the information how many are known missing values we have.

03:49.930 --> 03:56.950
So here in these survived passenger class and sex column we do not have any missing value so we have

03:57.070 --> 04:05.310
values for each row and for the H column here we have obviously one hundred seventy seven missing values

04:05.310 --> 04:14.230
so far 177 passengers we actually do not know the H and in the deck column there are obviously many

04:14.230 --> 04:22.380
missing values and here on the right side you can see that data type in each column so in the survive

04:22.380 --> 04:28.500
column B a half either serial or one it's an integer an awesome the passenger class column we have one

04:28.510 --> 04:29.740
two 3.

04:29.850 --> 04:37.920
This is also an integer then in the sixth column we have object and in very easy words object stands

04:37.920 --> 04:43.640
for a string data type and then we have H which is a float.

04:43.650 --> 04:48.150
So for example a thirty three point zero years

04:50.860 --> 04:54.180
and in this sub S P and patch columns we have an integer.

04:54.190 --> 05:01.450
So the amount of siblings for parents and for in the fact column again we have a float.

05:01.450 --> 05:09.900
So the price for the ticket that the peasants are paid for example is seven point eight nine and embarked

05:09.900 --> 05:10.450
on deck.

05:10.450 --> 05:16.680
These are both columns with a string objects actually here so you can see S and B

05:20.440 --> 05:24.940
and then you can see a summary of the data types so we have two columns with float objects.

05:24.940 --> 05:34.170
We have four columns in the US and we have three columns with strings and the total memory usage of

05:34.170 --> 05:37.270
our data frame is sixty two point seven kilobytes.

05:37.290 --> 05:40.830
So we have here a very small dataset actually.

05:40.950 --> 05:44.280
So that data sets its megabytes and gigabytes.

05:44.910 --> 05:47.240
So this is very small and easy to handle.

05:48.600 --> 05:52.770
And that's also a attribute called shape.

05:54.720 --> 05:59.700
So this does not actually give us more information but it gets that's in the shape of our data frame.

05:59.700 --> 06:08.150
We have eight hundred ninety one rows and nine columns and last but not least that's the very helpful

06:08.150 --> 06:12.250
method to describe thought.

06:12.270 --> 06:13.100
Describe

06:18.890 --> 06:21.710
and here we can see for on American columns.

06:21.710 --> 06:29.980
So we have here integer and float we have 1 2 3 4 5 6 numerical columns.

06:29.990 --> 06:36.020
We can see here a summary for each columns then yeah actually a summary statistics.

06:36.110 --> 06:42.840
So column stands for the amount of num low values and in this survival column we have eight hundred

06:42.840 --> 06:44.360
ninety one num low values.

06:44.360 --> 06:51.560
So these are actually here the same values as here and we can see here in the column that we have missing

06:51.560 --> 06:55.250
values then next.

06:55.300 --> 06:58.350
Here we f and the mean for all columns.

06:58.720 --> 07:04.050
And we can see here that in total thirty eight percent of all passengers only survived.

07:04.150 --> 07:14.390
So 62 percent um died in the Titanic disaster and the Emirates passenger class is two point three.

07:14.390 --> 07:19.690
So they are much more passengers and class the two and three than in class one.

07:20.120 --> 07:30.240
And the average age is twenty nine and the average ticket price was a 30 to then we have here the standard

07:30.240 --> 07:37.140
deviation for all columns and the minimum so we can see here the youngest passenger was 0 point for

07:37.140 --> 07:44.110
2 years old um actually a baby and there were passengers that died.

07:44.120 --> 07:52.660
So the minimum value is 0 0 4 died and one four survived and with the passenger classes one two three

07:52.670 --> 08:00.000
the minimum is one year and we had actually passengers uh that uh didn't pay anything for that ticket

08:01.120 --> 08:07.480
and then here we have the 25th percentile we have the fifth person tile which is actually the median

08:08.230 --> 08:16.220
and we have uh seventy first person tile and we have the maximum for each column so there are passengers

08:16.220 --> 08:23.840
who survived um the last passenger class this class 3 the oldest passenger on board was 80 years old

08:25.210 --> 08:31.960
and that was the passenger that had eight siblings and spouses aboard and that was the presence of US

08:31.970 --> 08:40.820
the six children or parents onboard of the Titanic and the highest share that was paid was five hundred

08:40.820 --> 08:42.500
twelve dollar a pound.

08:42.500 --> 08:45.820
So obviously a presence in class one.

08:45.900 --> 08:51.360
So now we are finished with the first inspection of our dataset and only after a few minutes and a few

08:51.360 --> 08:57.750
lines of code we actually know a lot of information about our data set here and in the next sessions

08:57.780 --> 09:02.080
we have further build on our skills to further analyze our data set.

09:02.100 --> 09:03.870
Yes so hope to see you there by.
