text_plain_output_1.png
import numpy as np

import pandas as pd

df = pd.read_csv('/kaggle/input/ddos-dataset/Friday-WorkingHours-Afternoon-DDos.pcap_ISCX.csv')

df.columns

columns_to_drop = ['Flow ID', ' Source IP', ' Destination IP', ' Timestamp']
df = df.drop(columns_to_drop, axis=1)

df.columns

df = df[~np.isinf(df['Flow Bytes/s'])]
df.dropna(inplace=True)

X = df.drop(' Label', axis=1)
y = df[' Label']

num_columns = X.shape[1]
print(num_columns)