This commit is contained in:
kai
2025-06-01 13:28:23 +02:00
parent 927624547f
commit 8d58438f4e

View File

@@ -1,4 +1,5 @@
import csv
import math
def compare_csv(file1, file2):
with open(file1, newline='') as f1, open(file2, newline='') as f2:
@@ -14,7 +15,7 @@ def compare_csv(file1, file2):
print(f"Zeile {row_idx}: unterschiedliche Spaltenanzahl")
continue
for col_idx, (cell1, cell2) in enumerate(zip(row1, row2), start=1):
if !math.isclose(cell1, cell2, abs_tol=1e-7):
if not math.isclose(cell1, cell2, abs_tol=1e-7):
print(f"Unterschied in Zeile {row_idx}, Spalte {col_idx}: '{cell1}''{cell2}'")
if __name__ == "__main__":