WEBVTT - This file was automatically generated by VIMEO

0
00:00:07.690 --> 00:00:08.290
Hi.

1
00:00:08.290 --> 00:00:13.270
In this video we will learn more about how to summarize our data using

2
00:00:13.440 --> 00:00:15.030
cross up and Pivot table.

3
00:00:18.920 --> 00:00:23.760
I think that most of you are familiar with Pivot Table from Excel and pivot

4
00:00:23.860 --> 00:00:25.360
tables. In Pandas, uh,

5
00:00:25.360 --> 00:00:29.730
work the same way we have to specify on the index, uh,

6
00:00:29.800 --> 00:00:33.570
that will be the rows. Then we have to specify the columns,

7
00:00:35.470 --> 00:00:38.990
a column which we want to summarize and the aggregate function

8
00:00:41.200 --> 00:00:42.250
Here. In this example,

9
00:00:42.450 --> 00:00:47.290
I wanted to see what is the average time of the attack per protocol

10
00:00:47.350 --> 00:00:48.410
and attack category.

11
00:00:54.580 --> 00:00:59.520
We can specify in each of the parameters a list of columns or aggregate

12
00:00:59.760 --> 00:01:01.560
functions as well. Here, for example,

13
00:01:01.860 --> 00:01:04.200
we see the same as in the previous example,

14
00:01:04.380 --> 00:01:08.080
but with added other aggregation metric count.

15
00:01:12.810 --> 00:01:13.710
And by the way,

16
00:01:14.570 --> 00:01:19.340
this way you can set the pandas options on how to display data

17
00:01:19.400 --> 00:01:24.140
frames in Jupyter. Here I have said I want to display the whole data frame.

18
00:01:32.710 --> 00:01:35.720
Another example is the same, uh,

19
00:01:35.830 --> 00:01:38.800
with added source IP to the index.

20
00:01:45.910 --> 00:01:49.980
Panda Cross Up provides you the same functionality as pivot table,

21
00:01:50.400 --> 00:01:55.090
but there is a difference that to the parameters you can pass separate

22
00:01:55.190 --> 00:01:58.440
series. Notice this one.

23
00:01:58.700 --> 00:02:02.480
We have already filtered a series from the data frame, and

24
00:02:06.140 --> 00:02:09.940
here in the pivot table we just specify the column names.

25
00:02:14.570 --> 00:02:19.430
In our next video, we will learn more on how to use, uh, group by, uh,

26
00:02:19.530 --> 00:02:20.310
and aggregate.
