Skip to content

Commit

Permalink
ex4 evaluation test
Browse files Browse the repository at this point in the history
  • Loading branch information
Ozodbek47 committed Jan 21, 2024
1 parent c36e9a3 commit cdcdeec
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions exercises/exercise4.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit cdcdeec

Please sign in to comment.