Possibel mistake in the context of guided project?


I guess there is an issue in the second page of the guided project.

Screen Link: https://app.dataquest.io/m/244/guided-project%3A-building-a-handwritten-digits-classifier/2/working-with-image-data

Code in the mission context:

first_image = train.iloc[0]
first_image = first_image.drop('label', axis=1)
np_image = first_image.values
np_image = np_image.reshape(28,28)

Problem is based on the description, we are using load_digits() of sklearn.datasets class. This dataset is a 1797*64, so if we choose one row on this data set, which is a handwritten digit, we get a series or numpy array with dimension (64,). So, like above scripts, if we try to reshape this array into a (28,28), it doesn’t work.

Maybe I’m missing something here.



No, you are right. It should be (8, 8) and not (28, 28).

Please use the Contact Us button in the top-right of this page and report this to them directly. They can then fix the content accordingly.


Hi, concerning the same page. It says to do:
first_image = first_image.drop(‘label’, axis=1)
However, it gives an error because “label” doe snot exist. is it me that i am not understanding anything about this data, or is the whole description wrong?
I am seeing the projects of other students, and they do not use reshape at all.
Could you please clarify this?
Thanks so much

1 Like