Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor fixes in MIMIC_example #224

Merged
merged 2 commits into from
Nov 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions MIMIC-IV_Example/pre_MEDS.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ def main(cfg: DictConfig):
)
exit(0)

all_fps = list(input_dir.glob("**/*.*"))
all_fps = list(input_dir.rglob("*/*.*"))
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Allows to properly find files if subdirs are symbolic links


dfs_to_load = {}
seen_fps = {}
Expand Down Expand Up @@ -299,9 +299,9 @@ def main(cfg: DictConfig):

logger.info(f"Loading {str(df_to_load_fp.resolve())} for manipulating other dataframes...")
if df_to_load_fp.suffix in [".csv.gz"]:
df = read_fn(df_to_load_fp, columns=cols)
df = df_to_load_read_fn(df_to_load_fp, columns=cols)
else:
df = read_fn(df_to_load_fp)
df = df_to_load_read_fn(df_to_load_fp)
logger.info(f" Loaded in {datetime.now() - st}")

for fp in fps:
Expand Down
Loading