WEBVTT

00:00.700 --> 00:04.920
HEY EVERYBODY IS SOME this video we make our very first steps with pandas.

00:04.960 --> 00:07.130
And then you work with data.

00:07.200 --> 00:13.400
We first have to import the data into our place of environment and then make a very first inspection.

00:13.420 --> 00:18.520
So typically when we've asked this and new data we do not really know how the data looks like and therefore

00:18.520 --> 00:20.910
we have to get a very first impression.

00:21.040 --> 00:27.310
And after that then we can determine further steps like that we need additional data or we need to clean

00:27.310 --> 00:31.350
that data out handle missing values or rearrange the data.

00:31.350 --> 00:37.480
But the effect this pandas pendency first have to import pandas so it's not by default imparted to our

00:37.480 --> 00:38.450
Python Ryan and

00:44.540 --> 00:46.720
and we import pandas as PD.

00:46.730 --> 00:54.960
So that's spy convention here and in this video and the next video Seberg heavily with the Titanic data

00:54.960 --> 00:58.420
set where we get many information about each passenger.

00:58.410 --> 01:03.050
So for example age or whether the passenger has survived or not.

01:03.050 --> 01:06.590
And in our folder we already have from the CSB fire.

01:06.620 --> 01:14.240
So CSP stands for camera separated value and the Titanic CSB fire that we have to impart here and our

01:14.240 --> 01:21.950
paisan and Ryan Hammond and this independence method read sea as we where we can impart them CSP fires

01:22.700 --> 01:26.690
and we already get a kind of Tabula organization of our data.

01:26.720 --> 01:37.690
So let's have feared the CSP method and then in brackets we have to pass in the file name so it's Titanic

01:37.700 --> 01:38.810
dot see a suite.

01:39.160 --> 01:48.970
And we need this in quotation marks and let's run the set here and this already looks quite good.

01:48.970 --> 01:54.620
So we have here the Titanic data set where we have firm rows here and each row stands for one passenger

01:54.630 --> 02:01.210
and we have here nine columns and each column is actually a characteristic of the passengers of Flight

02:01.220 --> 02:08.860
sample Passenger 1 has not survived them the disaster so zero sense form that survived and one stands

02:08.860 --> 02:11.940
for survived and we have the passenger class.

02:11.950 --> 02:18.580
So we have three Peasants are classes and then we have the sex or gender of the passengers in this example

02:18.580 --> 02:28.520
it's a male then we have the h here and sip S P stands for the amount of sibling saw policies of the

02:28.520 --> 02:37.160
peasants are onboard and Podge stands for the amount of to run or parents of the peasants aboard and

02:37.160 --> 02:43.730
ferries and actually the ticket price and the peasants are paid for the trip then we have here the part

02:43.730 --> 02:50.870
of embarkation So for example S stands for South Hampton and last but not least here we have the deck

02:50.870 --> 02:53.210
where the cabin of the peasant sir was located.

02:53.210 --> 02:56.640
So for example a taxi or E.

02:56.720 --> 03:01.220
All right so this looks pretty good and I think we are already happy with them the importing of the

03:01.220 --> 03:09.920
data also a fair press here just tab we can see that the method read CSP has many options here and this

03:09.920 --> 03:15.860
is very helpful when we have a messy data to clean the data directly when we impart it but that's not

03:15.860 --> 03:25.340
necessary here so then we can save our data set and assign a variable so let's say we have type panic.

03:25.500 --> 03:32.430
So now we have saved our data set into our terminal notebook and just all the variables we can just

03:32.430 --> 03:40.880
print Titanic here now we can have a deeper look here so we are starting with the first peasant at an

03:40.880 --> 03:46.100
exposition zero and we end up with.

03:46.100 --> 03:51.530
They are actually eight hundred ninety one rows so each row stencil on passenger and nine columns and

03:51.530 --> 04:00.630
each column stands for a characteristic of the passenger and we can also see here that by default pace

04:00.630 --> 04:08.950
and prints out them the first three rows and the last 30 rows so when we have a very large data set

04:08.950 --> 04:13.840
with let's say ten thousand rows it definitely does not make sense to print out all the rows.

04:13.840 --> 04:23.300
So that's by default here we have six zeros however we can change this default setting with the PD dot

04:23.330 --> 04:30.290
options that this play thought Max row is.

04:30.380 --> 04:31.390
So we this.

04:31.400 --> 04:32.470
And here we can change.

04:32.470 --> 04:34.610
So by default at 62 times 30.

04:34.610 --> 04:36.870
And by default we can change this too.

04:36.890 --> 04:38.560
For example 100.

04:38.810 --> 04:43.470
So then because let's see here the first 50 rows and the last 50 rows.

04:43.940 --> 04:44.840
Let's check here

04:50.200 --> 04:51.390
and here we can see.

04:51.390 --> 04:51.840
All right.

04:51.870 --> 04:53.480
So we have the first 50 rows.

04:53.490 --> 05:01.420
And the last 50 rows and when we are not working in Jupiter we when we want to print the data.

05:01.450 --> 05:03.640
So we have to use them that print function near

05:08.600 --> 05:13.110
and then we use in the print function you can see here that the other data is not not really formatted.

05:13.110 --> 05:19.770
So the graphical rendering of took it a notebook here is much better and yeah if you want to print a

05:19.770 --> 05:22.100
data set a data frame here interpret a notebook.

05:22.110 --> 05:23.610
I would always use it.

05:23.700 --> 05:25.830
Without the print function.

05:25.830 --> 05:28.230
So here's the graphical rendering is quite pretty here.

05:32.670 --> 05:33.000
All right.

05:33.000 --> 05:38.430
So now we are finished with this video and in the next video we continue our first inspection.
