From d5ee51103d9dd7d4ba1404eaccdb202783dd8380 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 6 Feb 2024 08:00:18 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- aisdc/preprocessing/loaders.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/aisdc/preprocessing/loaders.py b/aisdc/preprocessing/loaders.py index e57c6e42..7cee7db6 100644 --- a/aisdc/preprocessing/loaders.py +++ b/aisdc/preprocessing/loaders.py @@ -465,6 +465,7 @@ def _mimic_iaccd(data_folder: str) -> Tuple[pd.DataFrame, pd.DataFrame]: return (X, y) + def _RDMP( # pylint: disable=too-many-locals, too-many-statements data_folder: str, ) -> Tuple[pd.DataFrame, pd.DataFrame]: @@ -590,7 +591,7 @@ def hospital_days(row): ] # Process first file - df = pd.read_csv(files_path[0], usecols=headers0, encoding='ISO 8859-1') + df = pd.read_csv(files_path[0], usecols=headers0, encoding="ISO 8859-1") # Change name to be the same in all files df.rename(columns={"PatientID": "chi"}, inplace=True) df = df.groupby(["chi"]).max() @@ -606,7 +607,7 @@ def hospital_days(row): del df_ # Process third file - df__ = pd.read_csv(files_path[2], usecols=headers2, encoding='ISO 8859-1') + df__ = pd.read_csv(files_path[2], usecols=headers2, encoding="ISO 8859-1") df__["AdmissionDate"] = pd.to_datetime(df__["AdmissionDate"]) df__["DischargeDate"] = pd.to_datetime(df__["DischargeDate"]) df__["days_in_hospital"] = df__.apply(hospital_days, axis=1)