I’m new to python, and I have not been able to find the solution anywhere. I have a column of ‘views_trailer’, and to get the values on the y axis I’m looking for, I need to take the sum of all the values in that column, based on the value in a different column. For example, I need to get the sum for ‘views_trailer’ for each day of the week, and then use those values as the y axis in order to compare how many views occured for each day of the week in a chart.
This is all I have at the moment. Again, total noob to Python, and really struggling with this. This is the only code I have, as I need to understand HOW to doth summation to get the values for the y axis in order to write additional code.
sns.boxplot(data=df,x='dayofweek', y='views_trailer',palette='CMRmap')
plt.xticks(rotation=90)
plt.show()
The above is giving me this ridiculous result:
I tried using tthe above expecting the Y-axis values to represent the total, but I either get a count, or a completely useless/unreadle graph, regardless of what I choose (bar, box, etc.).
grandaardvark is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.