Bar Plot grader

My code is ;

statement_count_by_category = """
SELECT product_category, COUNT(sentiment) AS count_sentiment
FROM reviews
GROUP BY product_category 
ORDER BY count_sentiment DESC
"""

And I am getting 0/15 in bar plot. Do not know where is the problem.

Hi @fat,

I hope all is well with the course. Assuming you’re asking about Exercise 4 of Week 1, the query you should assign is already written for you in the statement_count_by_category_desc object, not the one you write in Exercise 3.

Please, take a look again in the instructions:

Exercise 4

Use barplot function to plot number of reviews per product category.

Instructions : Use the barplot chart example in the previous section, passing the newly defined dataframe df_count_by_category_desc with the count of reviews. Here, please put the product_category column into the y argument.

I hope it helps out! Let me know how it goes. :slight_smile: :love_you_gesture:

Cheers!


I’m getting 0/10. Did I miss something?

I need to move it a separate post.

No, you didn’t miss anything. I thought I was helping you guys by putting %matplotlib inline in that cell in case there were some people who couldn’t figure out why the plot wasn’t showing. Little did I know, when it is in the same cell as the grader, the grader breaks! Just move %matplotlib inline somewhere else or just get rid of it and plt.show() should work if you still want to see the plot. This should be fixed in the very near future, the pull request is just waiting for review.

Thanks for the insight.