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

raise KeyError(f"{not_found} not in index") #142

Open
daiyl opened this issue Mar 28, 2024 · 0 comments
Open

raise KeyError(f"{not_found} not in index") #142

daiyl opened this issue Mar 28, 2024 · 0 comments

Comments

@daiyl
Copy link

daiyl commented Mar 28, 2024

KeyError: '[200161, 200177, 200197, 200208,..., 299962, 299993] not in index'

The error occurred when it called "make_phenotype_label_matrix(phenotypes, stays=None)" because of this line "phenotypes = phenotypes.loc[stays.ICUSTAY_ID.sort_values()]"

line 98, in make_phenotype_label_matrix
phenotypes = phenotypes.loc[stays.ICUSTAY_ID.sort_values()]

Why are so many ICUSTAY_IDs not in the phenotypes? Can I discard these ICUSTAY_IDs?

BTW, the original codes seem not runnable. DataFrame object has no attribute 'ix', I have replaced all the ".ix" to ".loc".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant