From the course: Data Analysis with Python and Pandas

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

Challenge: Bar charts

Challenge: Bar charts

- [Instructor] All right, everybody, new email in from Joey. Subject line is Transactions by Store. He writes us, "Hi there, thanks for your help. Can we summarize total transactions by store in a bar chart? Then create a horizontal bar chart with the Y axis as month and the x axis as sales. Some code has been provided in the notebook attached to help create the table for the stacked bar plot, thanks." All right, let's go ahead and take a look at the notebook. All right, so we have our stores_123 DataFrame. This is what we used in the last assignment, and one thing that I've done has gone ahead and stored this for you with the data type of our index as a date time. This is going to allow me to extract the month, and then we've created a monthly table that has the total sales for each store grouped by month. And so for our first chart, we're going to need to calculate the totals of our stores_1234. So we want to aggregate stores_1234 and just get the sum for each of the columns. And…

Contents