Hi, I am facing this error in my format output exercise, while the same thing works in the next exercise. Please tell what mistake am I making. Thank You
Week 1 - Format Ouput
Hy @Syed_Hamza_Tehseen ,
Maybe the problem comes from the Train Test Split (TODO) section.
It seems like you pop the “quality” column from the train dataframe.
Just before to call the function where you are obtaining the error, check the shape and content of train. The shape must be (3155, 13).
And you can check the value of train.quality[0:5] to see the first 5 values in the quality column. If you got an error, yo know where the problem is
Hope it Helps!
Pere.
Hi Pere, last night when I was attempting the quiz, I got this error. But now, without changing anything, I’ve passed all the tests. Now, I’m curious what was the issue last night?
Edit: Now, when I am running that particular cell again, it’s throwing a KeyError, but when I run 2 or 3 cells above, it’s running fine
Hi! This is normal, because this cell changes the shape of the data, if you execute it two times the column required isn’t in the dataset.
Execute train.shape just before and after the cell, and you can see how some columns are removed.
If you execute again the cells that creates the dataframe train (and the others) the cell will execute without problem.