From 7d8416f920f6d226f1d22ff6966cfcf47e61005e Mon Sep 17 00:00:00 2001 From: presnecov_danila Date: Fri, 17 Apr 2026 19:36:35 +0300 Subject: [PATCH] update main --- main.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/main.py b/main.py index ed6b6e7..3e7e48a 100644 --- a/main.py +++ b/main.py @@ -89,33 +89,20 @@ def export_summary(records: list[dict], output_path: str) -> None: def main() -> None: - # 1. Загрузка data = load_data("data/sales.csv") - - # 2. Очистка data = clean_data(data) - - # 3. Фильтрация filtered = filter_by_price_range(data, 10, 500) - - # 4. Анализ rev = total_revenue(filtered) category_revenue(filtered) best_cat = best_selling_category(filtered) top3 = top_n_items(filtered, 3) monthly = monthly_sales(filtered) - - # 5. Вывод в консоль print(f"--- Результаты анализа (фильтр: 10-500 руб) ---") print(f"Общая выручка: {rev:.2f}") print(f"Лучшая категория: {best_cat.capitalize()}") print(f"Топ-3 товара: {top3}") print(f"Выручка по месяцам: {monthly}") - - # 6. Экспорт export_summary(filtered, "report.txt") print(f"\nОтчет успешно сохранен в report.txt") - - if __name__ == "__main__": main()