WEBVTT

00:02.840 --> 00:07.740
In this short but pretty helpful video I will show you how to tremendously improve your coding efficiency

00:07.740 --> 00:13.440
and pandas so down total to keyboard shortcuts that can make your life much easier.

00:13.470 --> 00:18.340
And first of all we have the tap completion also called auto complete.

00:18.390 --> 00:23.800
And second we can open two tips and get some useful information on each and every pen us method and

00:23.820 --> 00:24.870
attribute.

00:24.870 --> 00:26.430
So we will see in a minute how it works.

00:26.430 --> 00:32.000
But first of all we import pandas and let us assume that we want to import the Titanic.

00:32.010 --> 00:33.170
Yes yes we file.

00:33.540 --> 00:37.900
And we have already learned that we can do this with the direct pandas method.

00:37.920 --> 00:41.270
Read C.S. weir so let's try this out here.

00:41.310 --> 00:46.170
So we are tapping pandas thought and then we can press the tap key here.

00:46.350 --> 00:51.080
And if we press the tap key then we get some suggestions how to complete our code.

00:51.420 --> 00:53.070
So let's do this here.

00:53.250 --> 00:59.040
And in this example we get all direct pandas methods and attributes and an alphabet ical order.

00:59.040 --> 01:06.550
So starting here with the the method categorical then we have a data frame date offset and so on.

01:06.570 --> 01:09.550
So we want to work with the agreed CSB method.

01:09.660 --> 01:16.830
So we continue of writing and let's Kent continue here with the read and then you can see here that

01:16.920 --> 01:24.060
the suggestions change and actually we only get suitable suggestions so for example read the clipboard

01:24.060 --> 01:31.500
read see as we read excel and so on and actually now we could select the read CSB method here and we

01:31.500 --> 01:38.040
can see here our code gets auto completed but for the travel time being let's go back again and let's

01:38.040 --> 01:43.770
again press here the tab key and actually if you continue writing further.

01:43.790 --> 01:50.880
So we have to read and let's continue with a C then we can see here that we have only two in the chest

01:50.880 --> 01:53.760
since the read clipboard and read C as we.

01:54.240 --> 02:02.640
And let's further continue here with the C S and finally we can see that only we have once the chest

02:02.640 --> 02:03.140
some left.

02:03.140 --> 02:10.190
So let's here the read C as we method and if there's only one suggestion left if we again press the

02:10.200 --> 02:12.710
tap key then our code gets auto completed.

02:12.720 --> 02:20.340
So here we have the read CSB method and let's open here the parent users and let's pass here our Titanic

02:20.340 --> 02:27.500
taught the C as we file so also here we can start writing Titanic and then we can also try to press

02:27.560 --> 02:31.830
the tab key and by doing so as here we get some suggestions.

02:31.830 --> 02:35.890
So here we have in our folder the Titanic Dot.

02:35.910 --> 02:42.930
C as we file we have Titanic cleaned out sea yes we and many more CSB files which we will work with

02:43.020 --> 02:44.060
later and this costs.

02:44.070 --> 02:46.890
So in this example we're selecting the Titanic.

02:46.930 --> 02:51.560
Todd CSB fire and here we can see we can import it.

02:51.750 --> 02:57.420
And finally we can store here our Titanic dots sea as we file in a data frame and then the variable

02:57.420 --> 02:58.140
Titanic

03:02.080 --> 03:07.840
and now we want to do something with the Titanic data frame and also here when we start writing Titanic

03:08.350 --> 03:13.290
and then uh we press the tab key then we get many suggestions.

03:13.360 --> 03:17.530
And here the first suggestion would be our data frame Titanic.

03:17.710 --> 03:23.110
And by clicking here our code gets order completed and we can never look again here at our Titanic data

03:23.110 --> 03:26.390
frame.

03:26.410 --> 03:26.910
All right.

03:26.920 --> 03:31.840
So now let's assume that we want to sort our Titanic data frame by the column H.

03:31.840 --> 03:38.700
So we want to sort all passengers from young to our or from 0 to young and that's actually the math

03:38.700 --> 03:40.250
that sort values.

03:40.420 --> 03:44.530
So later in this class we will go deeper into the sort various method.

03:44.530 --> 03:50.620
But now for the time being let's assume that we want to work with these sort various method and then

03:50.620 --> 03:57.940
we can start writing he Assad and then we can press the tab key and here we get two suggestions so we

03:57.940 --> 04:05.080
get the Assad index method and the Assad better use method and we can actually select here the Assad

04:05.080 --> 04:07.020
well use method.

04:07.080 --> 04:14.070
So this is a Pandora's data for a method and we can open here the parent teases and now if you want

04:14.070 --> 04:21.330
to have some more informations on the parameters that we can use here we can actually press the shift

04:21.420 --> 04:29.400
tab and by pressing shift tab here we can see for the Assad valid use method all of the parameters so

04:29.400 --> 04:37.860
we have the parameter by access ascending in place kind and in a position and we also get use some description

04:37.860 --> 04:39.270
of the method.

04:39.330 --> 04:46.420
So the sort various method actually sorts by the value along either axis and we can also get a more

04:46.420 --> 04:53.800
detailed view on the pyramid us and we can do this by pressing a shift and the tap tap so two times

04:53.800 --> 04:59.350
tap and by doing so we can scroll you down and here we can see the pyramid does.

04:59.360 --> 05:07.100
So we have for the bypass meta narrative we can pass a name or a list of column names to sort by.

05:07.380 --> 05:14.760
So here in our example we want to sort our Titanic data frame by the Column H then next we have fear

05:14.770 --> 05:19.090
the parameters axes ascending that we can pass either.

05:19.140 --> 05:20.500
True or false.

05:21.060 --> 05:27.360
So by passing through here we thought our presence us in an ascending order from young peasant just

05:27.360 --> 05:35.030
to old peasant us and by passing forwards we thought our peasant us from old to young so to say in a

05:35.060 --> 05:36.350
descending order.

05:36.920 --> 05:40.060
And also we can see the other parameters in place kind.

05:40.070 --> 05:41.060
And so on.

05:41.150 --> 05:47.190
So later in this course we will go deep and to hear the sort value's method.

05:47.240 --> 05:53.540
So now we have a good overview over the parameters and now we can start to typing the parameters.

05:53.540 --> 05:55.420
So we have the piper meta.

05:55.430 --> 05:57.170
And let's start typing here.

05:57.200 --> 06:04.820
So we want to sort our data frame by the H column and we can also run near the cell and we can see we

06:04.820 --> 06:07.810
have sorted our peasants us from young to old.

06:07.820 --> 06:14.570
So starting with the passenger that is only 0 point for 2 years old and we've also seen here that when

06:14.570 --> 06:20.720
we start typing here then the tooltip diminishes but we can change this behavior by tapping shift and

06:20.780 --> 06:22.550
tap three times.

06:22.550 --> 06:30.160
So I press your shift and then three times tap and we can see that again the tooltip opens and here

06:30.170 --> 06:35.720
we can see a clock sign and it says so the Twitter will linger for 10 seconds while you type.

06:35.790 --> 06:44.280
So the 10 seconds are almost gone so let's press again shift and three times tab and then we can actually

06:44.280 --> 06:46.110
uh continue writing here.

06:46.110 --> 06:51.990
And for example we could also determine the ascending power meter and we can see here that the tooltip

06:51.990 --> 06:59.960
is still open and now we can see that the clock sign has diminished and last but not least that there's

06:59.960 --> 07:01.930
also a fourth option.

07:02.170 --> 07:06.690
And we can also press a shift and tap four times so let's do this here.

07:06.820 --> 07:09.820
I press shift and four times tab.

07:10.570 --> 07:15.670
And here we can see that a complete window opens with them the tooltip.

07:15.760 --> 07:17.690
So here we can see the parameters.

07:17.740 --> 07:21.460
Then this is the description of the method and all parameters here.

07:24.070 --> 07:25.670
And we can also close again here.

07:25.690 --> 07:27.480
The window.

07:27.650 --> 07:33.530
So now we are already finished with this video and I want to show you one last time the tab completion.

07:33.650 --> 07:38.310
So let's assume again that we have no clue here on the Assad values method.

07:38.510 --> 07:41.750
And we again open here the tool tip.

07:41.750 --> 07:46.920
So we open here the separate window and we can see here the ascending parameter.

07:47.150 --> 07:48.970
And now we know that.

07:49.030 --> 07:51.830
Say ascending power meter and we start typing.

07:52.100 --> 07:59.000
And then by pressing the tab key then automatically we get here the ascending power meter as as the

07:59.000 --> 07:59.420
tests.

07:59.420 --> 08:03.730
And so now we can also pass the force to the parameter ascending.

08:03.890 --> 08:06.350
So the default argument is true.

08:06.680 --> 08:13.070
So we get an ascending order but we can also pass your files and then we can run the cell here again

08:13.610 --> 08:21.050
and we can see here that all of our passengers are sorted from high H to low eight so we can actually

08:21.050 --> 08:27.650
work in parallel so we can see here the parameters and we can read the documentation and then we can

08:27.650 --> 08:28.850
write our code.

08:28.880 --> 08:31.610
So this is quite comfortable.

08:31.610 --> 08:34.750
And once we are finished we can close the other window.

08:35.030 --> 08:37.670
And with this we are finished with this video.

08:37.670 --> 08:43.700
So I do think that the tab completion and opening two tips is really useful and helpful when coding

08:43.700 --> 08:50.960
and pandas and in general and python and by doing so we can definitely save some time and have fun with

08:51.000 --> 08:52.030
the coding.

08:52.040 --> 08:56.390
So this is it for the time being and I hope to see you also in the next video by.
