I am getting error in Imbalanced data (TODO)

I used df = df[(df[‘quality’] > 4) & (df[‘quality’] < 8)]


I’m not sure about what could be the problem. The line that are you using to obtain the wines with a rate between 4 and 8 is correct.

Maybe the issue will be in one of the previous steps?
You can check that the previous values are the same as the Expected Outputs.

Or perhaps you have uncommented the line with the df.iloc… it must be commented when you are passing the tests, it’s in the notebook only in case you want to experiment after sent the assignment.

I hope it can help you.