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

Error #1

Open
ishnit opened this issue Oct 28, 2017 · 3 comments
Open

Error #1

ishnit opened this issue Oct 28, 2017 · 3 comments

Comments

@ishnit
Copy link

ishnit commented Oct 28, 2017

I am relatively new to python and i am getting this error:
Traceback (most recent call last):
File "train.py", line 37, in
(X_train,y_train),(X_val,y_val) = get_mnist_data()
File "train.py", line 16, in get_mnist_data
labels = data[[0]].values.ravel()
File "/home/ishnit/.local/lib/python2.7/site-packages/pandas/core/frame.py", line 1958, in getitem
return self._getitem_array(key)
File "/home/ishnit/.local/lib/python2.7/site-packages/pandas/core/frame.py", line 2002, in _getitem_array
indexer = self.loc._convert_to_indexer(key, axis=1)
File "/home/ishnit/.local/lib/python2.7/site-packages/pandas/core/indexing.py", line 1231, in _convert_to_indexer
raise KeyError('%s not in index' % objarr[mask])
KeyError: '[0] not in index'

@EvanCoh
Copy link

EvanCoh commented Nov 20, 2017

I get the same error. Is it because of python 3.5 ?

@PR-Iyyer
Copy link

Getting same error for me as well. :(

@PR-Iyyer
Copy link

i got that error corrected by changing the line number 16 to labels = data.iloc[:,:1].values.ravel()

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

3 participants