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

TypeError: Passing a set as an indexer is not supported. Use a list instead. Occured in Chapter08. #35

Closed
AhmedGillani opened this issue Feb 29, 2024 · 2 comments

Comments

@AhmedGillani
Copy link

I faced this issue when I was running 01-Forecasting with ML.ipynb file, the following error occurred when I executed the Sample Household block.
The error originated from src/forecasting/ml_forecasting.py --- line 153
df.loc[:, set(feature_list + self.index_cols)]
The reason of this error is that sets are not hashable and, therefore, cannot be used as an index.
so, I replace that line with the following:
df.loc[:, list(set(feature_list + self.index_cols))]
and it worked.

@manujosephv
Copy link
Collaborator

Thanks for pointing it out.. Will change it in the code

@ArjunVarma39
Copy link

Hi @AhmedGillani, I am closing this issue for now, please reopen if this issue persists.

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

No branches or pull requests

3 participants