add UML, fix structure

This commit is contained in:
2025-11-23 17:37:45 +03:00
parent 75c30afb31
commit 3782217438
10 changed files with 846 additions and 8 deletions
+30
View File
@@ -0,0 +1,30 @@
import csv
def parse_csv_to_structure(path):
result = {}
with open(path, newline='') as f:
reader = csv.reader(f)
rows = list(reader)
headers = rows[0][1:]
for row in rows[1:]:
obj = row[0].strip()
if not obj:
continue
result[obj] = {}
for header, value in zip(headers, row[1:]):
value = value.strip()
if value:
result[obj][header] = value
return result
if __name__ == "__main__":
data = parse_csv_to_structure("input.csv")
print(data)