Click here to Skip to main content
15,666,122 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Basically, I have a dataset with car models and I need a bar graph where the highest review count of 20 car brands should be displayed in the bar graph!

I have tried this below code but I am getting all the brand models from the dataset I need only the top 20 highest review count car brands in the bar graph.

Used Dataset:

What I have tried:
x_zoom = np.linspace(-1, 1, 50)
y_zoom = np.sin(x_zoom)['car_name'], Data['reviews_count'])
plt.xlabel("car name")
plt.ylabel("Review Count") 
OriginalGriff 22-Nov-22 4:22am    
What have you tried?
Where are you stuck?
What help do you need?

Use the "Improve question" widget to edit your question and provide better information.
Richard MacCutchan 22-Nov-22 4:37am    
You need to add a filter, or sort, to extract the top 20 before you pass them to the plot.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900