I have a pandas dataframe as so
course rating
math 4
math 5
sport 1
physics 2
What is the easiest way to find the mean rating based on each course, so basically group by each course and finds its mean rating, so for the example data set above I should be able to retrieve Math has a mean rating of 4.5, sport has meaning rating of 1, and physics has mean rating of 2. Then be able to convert that into a plotly pychart.