Spaces:
Runtime error
Runtime error
Download scripts/utils/merge_datasets.py from rb1337/Phishing-Detection-System: direct link, hf CLI and curl.
- Browser
- Download file 623 Bytes
-
https://huggingface.co/spaces/rb1337/Phishing-Detection-System/resolve/main/scripts/utils/merge_datasets.py
- Command line
-
hf download hf://spaces/rb1337/Phishing-Detection-System/scripts/utils/merge_datasets.py
-
curl -L -o merge_datasets.py https://huggingface.co/spaces/rb1337/Phishing-Detection-System/resolve/main/scripts/utils/merge_datasets.py
623 Bytes
| import pandas as pd | |
| df1 = pd.read_csv('data/raw/phishing.csv') | |
| df2 = pd.read_csv('data/raw/legitimate.csv') | |
| df2.columns = df2.columns.str.lower() | |
| combined_df = pd.concat([df1, df2], ignore_index=True) | |
| combined_df = combined_df.drop_duplicates() | |
| combined_df.to_csv('data/processed/clean_dataset.csv', index=False) | |
| print(f"Datasety boli úspešne spojené") | |
| print(f"Počet záznamov v prvom súbore: {len(df1)}") | |
| print(f"Počet záznamov v druhom súbore: {len(df2)}") | |
| print(f"Celkový počet záznamov: {len(combined_df)}") | |
| print(f"\nPrvých 5 riadkov spojeného datasetu:") | |
| print(combined_df.head()) |