Skip to content
This repository has been archived by the owner on May 3, 2023. It is now read-only.

Commit

Permalink
fix: remove unreasonably high or low bmi values
Browse files Browse the repository at this point in the history
  • Loading branch information
signekb committed Apr 3, 2023
1 parent f0dbbb9 commit 07f52c2
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,13 @@ def weight_in_kg(n_rows: int | None = None) -> pd.DataFrame:

@data_loaders.register("bmi")
def bmi(n_rows: int | None = None) -> pd.DataFrame:
return sfi_loader(
df = sfi_loader(
aktivitetstypenavn="Bestemmelse af Body Mass Index (BMI)",
elementledetekst="BMI",
n_rows=n_rows,
value_col="numelementvaerdi",
)

df = df[(df["value"] > 10.0) & (df["value"] < 70.0)]

return df

0 comments on commit 07f52c2

Please sign in to comment.