From 423743323a8e6210f8e33d8c57f3632611e64466 Mon Sep 17 00:00:00 2001 From: hubobel Date: Tue, 16 Jun 2026 13:13:13 +0200 Subject: [PATCH] Komma statt Punkt --- categorize_transactions.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/categorize_transactions.py b/categorize_transactions.py index 40d6faa..b3046bf 100644 --- a/categorize_transactions.py +++ b/categorize_transactions.py @@ -195,8 +195,20 @@ with open(csv_file, "w", newline="", encoding="utf-8") as csvfile: delimiter=";" ) + csv_export = [] + + for row in categorized_transactions: + csv_row = row.copy() + + csv_row["amount"] = ( + f"{float(row['amount']):.2f}" + .replace(".", ",") + ) + + csv_export.append(csv_row) + writer.writeheader() - writer.writerows(categorized_transactions) + writer.writerows(csv_export) # -------------------------------------------------- # JSON exportieren