i commited last idk when , so updates

This commit is contained in:
2025-12-01 11:45:42 +01:00
parent 4cab5d7202
commit 2c92baa9c8
28 changed files with 6957 additions and 505 deletions

2967
csv/autos/cars.csv Normal file

File diff suppressed because it is too large Load Diff

35
csv/autos/main.py Normal file
View File

@@ -0,0 +1,35 @@
# -*- coding: ansi -*-
import csv
from collections import defaultdict
def auswertung(csvf: str):
try:
with open(csvf, "r") as f:
reader = csv.reader(f, delimiter=";")
header = next(reader)
marken_count = defaultdict(int)
total_dataset = 0
for row in reader:
if len(row) < 2:
continue
total_dataset += 1
marke = row[1]
marken_count[marke] += 1
print(f"Insgesamt sind {total_dataset} Datens<6E>tze gespeichert!")
print(f"Insgesamt sind {len(marken_count)} verschiedene Automarken gespeichert!")
print()
for i, marke in enumerate(sorted(marken_count.keys()), start=1):
print(f"{i} : {marke} ist {marken_count[marke]} mal in der Liste gespeichert")
except FileNotFoundError:
auswertung("cars.csv")