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

KeyError: "None of [Index(['Fault'], dtype='object')] are in the [columns]" #1

Open
crazy-python opened this issue Apr 6, 2020 · 16 comments

Comments

@crazy-python
Copy link

I runned the code,but I met the problem of KeyError: "None of [Index(['Fault'], dtype='object')] are in the [columns]" in 132,so what should I do?Thanks a lot.

@benjamin2044
Copy link
Owner

benjamin2044 commented Apr 6, 2020

There are 4 python files uploaded in the repository. Which part of the file does the code belong to?

Don't run the whole code at once since it would be hard to debug. Try running section-wise, i.e few lines per run. I have used Spyder IDE which allows running only selected code by pressing Ctrl + Enter. If you use other Python IDEs, only run the section by uncommenting all the other part of the code.

@crazy-python
Copy link
Author

crazy-python commented Apr 6, 2020 via email

@benjamin2044
Copy link
Owner

I have tested the code multiple times and there were no errors. Please upload the screenshot of the code where you have the problem.

@crazy-python
Copy link
Author

crazy-python commented Apr 7, 2020 via email

@benjamin2044
Copy link
Owner

benjamin2044 commented Apr 7, 2020

I also had some issues when I upgraded Tensorflow. I had to downgrade it again. I have tested the code in Tensorflow version 1.15. Also the Tensorflow I have used is CPU version not GPU.
If you are using GPU Tensorflow, then the easiest way to test the code is by making a virtual environment and installing CPU Tensorflow version 1.15 there.

@crazy-python
Copy link
Author

crazy-python commented Apr 9, 2020 via email

@crazy-python
Copy link
Author

crazy-python commented Apr 9, 2020 via email

@benjamin2044
Copy link
Owner

@pratikshaya
Copy link

@crazy-python The error you have not belongs to the version of tensorflow. It just belongs to the indexing of pandas. May be the link https://stackoverflow.com/questions/55652574/how-to-solve-keyerror-unone-of-index-dtype-object-are-in-the-colum helps you alot.

@crazy-python
Copy link
Author

crazy-python commented Apr 20, 2020 via email

@benjamin2044
Copy link
Owner

benjamin2044 commented Apr 23, 2020

Sorry for the late reply. I had been busy lately.
For easy visualization please run the code only up to line 43. The purpose is to visualize the 7 dimension data to 2 dimension.
The rest of the code trains the ML network with dimensional reduced data. There are some issues with rest of the code. I will amend the code next week.

@pratikshaya
Copy link

I run the code in Eclipse IDE but there is no output even if I comment on the code line below 43. I don't know the exact reason behind it. But when I move from Eclipse to Spyder IDE following output is generated after commenting the code line below 43.
PCA

@benjamin2044
Copy link
Owner

Code has now been updated. However, it is not advised to run the whole program at once. It is better to run a part of the code commenting out rest of the code, and continue testing like this.

@crazy-python
Copy link
Author

crazy-python commented Apr 30, 2020 via email

@RAJAVAMSI9
Copy link

In 3000 patterns data , why voltages became zero during open fault , also below 30 degree is labeled as cloudy? please explain

1 similar comment
@RAJAVAMSI9
Copy link

In 3000 patterns data , why voltages became zero during open fault , also below 30 degree is labeled as cloudy? please explain

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

4 participants