Created
May 27, 2024 03:26
-
-
Save jgoodie/5db18b65f3d68b0e0f04737bbf5c29f1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
df = pd.read_csv("data/RT_IOT2022.csv") | |
print(df.shape) | |
print("===========================================") | |
print(df.head()) | |
print(df[['service', 'proto', 'Attack_type']]) | |
labels = dict(Counter(df.Attack_type).most_common()) | |
print(labels) | |
plt.figure(figsize=(8,6)) | |
plt.title("Attack Type distribution") | |
plt.bar(x=labels.keys(), height=labels.values()) | |
plt.xticks(rotation=45, ha='right') | |
plt.tight_layout() | |
plt.show() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment