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

Commit

Permalink
Merge pull request #225 from Aarhus-Psychiatry-Research/fix_bmi_remov…
Browse files Browse the repository at this point in the history
…e_data_entry_errors

fix: remove unreasonably high or low bmi values
  • Loading branch information
MartinBernstorff authored Apr 4, 2023
2 parents f0dbbb9 + 07f52c2 commit d233278
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 d233278

Please sign in to comment.