From d20dcdedef30b2199a27074c7205d7532d4b8e42 Mon Sep 17 00:00:00 2001 From: Daniel Svitan Date: Tue, 17 Dec 2024 15:25:00 +0100 Subject: [PATCH] :bug: Fixes dataset --- clean.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/clean.py b/clean.py index 34fd331..849c7ae 100644 --- a/clean.py +++ b/clean.py @@ -42,7 +42,15 @@ def parse_gpa(txt: str) -> float: if is_eu: txt = txt.replace(",", ".") - return float(txt) + num = float(txt) + while num >= 5: + fixed = input(f"Pleas enter fixed value for '{num}': ") + try: + num = float(fixed) + except ValueError: + pass + + return num def parse_ses(txt: str) -> int: