Python Forum
Ho to create a bar chart with two specific columns?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Ho to create a bar chart with two specific columns?
#1
Hello there
this is my data set

Vote_count vote_average
2000 4,5
500 5
3500 4
3000 3,5
2700 4,5
1500 3,5

I want to count how many people (vote_count) gave which rating in one bar chart (x axis: rating_vote and y axis: vote_count)

How can I do this in python 3?
I already did an attempt, but it is failed:

df[['vote_average', 'vote_count]].plot(kind='bar');
Reply
#2
Do the numbers in vote_average have ',' instead of '.'?
You should also post your errors.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Create Choices from .ods file columns cspower 3 618 Dec-28-2023, 09:59 PM
Last Post: deanhystad
  How to create a table with different sizes of columns in MS word pepe 8 1,587 Dec-08-2023, 07:31 PM
Last Post: Pedroski55
  Create csv file with 4 columns for process mining thomaskissas33 3 762 Nov-06-2023, 09:36 PM
Last Post: deanhystad
  create a default path with idle to a specific directory greybill 0 882 Apr-23-2023, 04:32 AM
Last Post: greybill
  Create Excel Line Chart Programmatically dee 3 1,200 Dec-30-2022, 08:44 PM
Last Post: dee
  Sum the values in a pandas pivot table specific columns klllmmm 1 4,652 Nov-19-2021, 04:43 PM
Last Post: klllmmm
  Remove Specific Columns when the number of columns is greater than a specific value CuriousOne 0 1,326 Sep-09-2021, 09:17 PM
Last Post: CuriousOne
  Create SQLite columns from a list or tuple? snakes 6 8,736 May-04-2021, 12:06 PM
Last Post: snakes
  Python Matplotlib: Create chart for every 4 columns in Excel file JaneTan 2 2,791 Feb-28-2021, 05:02 AM
Last Post: JaneTan
  How to extract specific rows and columns from a text file with Python Farhan 0 3,398 Mar-25-2020, 09:18 PM
Last Post: Farhan

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020