From cdcdeec368bd167e075d0945dfb68a8738671e59 Mon Sep 17 00:00:00 2001 From: Ozodbek47 Date: Sun, 21 Jan 2024 21:01:13 +0100 Subject: [PATCH] ex4 evaluation test --- exercises/exercise4.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/exercises/exercise4.py b/exercises/exercise4.py index 6e0e62500..eb7220786 100644 --- a/exercises/exercise4.py +++ b/exercises/exercise4.py @@ -14,16 +14,13 @@ z_ref.extract(csv_file_name, '.') # Reshaping the data -df = pd.read_csv(csv_file_name, delimiter=';', usecols=range(12)) +df = pd.read_csv(csv_file_name, delimiter=';', usecols=range(12), decimal=",") selected_columns = ["Geraet", "Hersteller", "Model", "Monat", "Temperatur in °C (DWD)", "Batterietemperatur in °C", "Geraet aktiv"] df = df[selected_columns] df = df.rename(columns={"Temperatur in °C (DWD)": "Temperatur", "Batterietemperatur in °C": "Batterietemperatur"}) # Transforming the data -df["Temperatur"] = df["Temperatur"].replace(',', '.') -df["Batterietemperatur"] = df["Batterietemperatur"].replace(',', '.') - df["Temperatur"] = (df["Temperatur"] * 9/5) + 32 df["Batterietemperatur"] = (df["Batterietemperatur"] * 9/5) + 32