Commit 100c03a4 authored by 冯思程's avatar 冯思程
Browse files

fix(scripts): fix

parent 9b3e7582
No related merge requests found
Showing with 3 additions and 2 deletions
+3 -2
...@@ -19,8 +19,9 @@ def compare_rows(csv_file, row1, row2): ...@@ -19,8 +19,9 @@ def compare_rows(csv_file, row1, row2):
try: try:
value1 = float(value1_str) value1 = float(value1_str)
value2 = float(value2_str) value2 = float(value2_str)
diff = value1 - value2 diff = value2 - value1
print(f"Difference in {header} (row1 - row2): {diff}") diff = diff / value1 * 100
print(f"Difference in {header} (row1 - row2): {diff}%")
except ValueError: except ValueError:
print(f"Error converting values in {header}: '{data1[i]}' and '{data2[i]}'") print(f"Error converting values in {header}: '{data1[i]}' and '{data2[i]}'")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment