199
As in Chapter
2
, you only want to focus on HTTP attacks, so let’s filter the data frame
to only include them (see
Figure
5-40
).
Figure 5-40. Filtering all the entries to include only HTTP attacks and dropping
the service column from the data frame
The new output is shown in Figure
5-41
.
Figure 5-41. The columns only consist of HTTP attacks. Here you look at the tail
end of the data frame
As a reminder, df.tail() performs the same function as df.head() but shows the
entries from the bottom up as opposed to top down. Also, you can pass a parameter in
the parenthesis to indicate the number of rows you want to see.
You don’t want values that are strings in your data, so you have to use the label
encoder as in Chapter
2
(see Figure
5-42
).
Chapter 5 Boltzmann maChines
200
The new output is shown in Figure
5-43
.
Do'stlaringiz bilan baham: