db_query / ziptool.py
DavMelchi's picture
Add KPI Health Check Panel v2 with multi-RAT analysis, interactive drilldown plots, complaint site tracking, snapshot comparison, preset/profile management, geographic map visualization, correlation analysis, and Excel export with alert pack generation including 3640 lines of UI components, caching logic, and health check engine integration
4ef0ce6
import os
import zipfile
# Path to your folder containing CSV files
folder_path = r"C:\Users\David\Documents\DISK E\BI REPORTING\FLOYD REPORT\2025\CAPACITY\DECEMBRE\20251229"
# Loop through all files in the folder
for filename in os.listdir(folder_path):
if filename.endswith(".csv"):
csv_path = os.path.join(folder_path, filename)
# Create a .zip file with the same name
zip_filename = os.path.splitext(filename)[0] + ".zip"
zip_path = os.path.join(folder_path, zip_filename)
with zipfile.ZipFile(zip_path, "w", zipfile.ZIP_DEFLATED) as zipf:
zipf.write(csv_path, arcname=filename)
print(f"Zipped: {csv_path}{zip_path}")