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
From the course: Data Analysis with Python and Pandas
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
(Locked)
The Matplotlib API and the plot() method9m 33s
-
(Locked)
Challenge: Basic line chart49s
-
(Locked)
Solution: Basic line chart3m 1s
-
(Locked)
Chart titles3m 26s
-
(Locked)
Chart colors5m 13s
-
(Locked)
Line styles2m 1s
-
(Locked)
Chart legends and gridlines3m 51s
-
(Locked)
Chart styles4m 8s
-
(Locked)
Challenge: Stylized line chart1m 11s
-
(Locked)
Solution: Stylized line chart1m 21s
-
(Locked)
Subplots and figure size5m 28s
-
(Locked)
Challenge: Subplots1m 33s
-
(Locked)
Solution: Subplots2m 59s
-
(Locked)
Bar charts6m 13s
-
(Locked)
Grouped and stacked bar charts5m 9s
-
(Locked)
Challenge: Bar charts1m 11s
-
(Locked)
Solution: Bar charts2m 19s
-
(Locked)
Pie charts and scatterplots6m 52s
-
(Locked)
Challenge: Scatterplots1m
-
(Locked)
Solution: Scatterplots2m 10s
-
(Locked)
Histograms3m 46s
-
(Locked)
Challenge: Histograms33s
-
(Locked)
Solution: Histograms1m 18s
-
(Locked)
Saving plots and further exploration3m 41s
-
(Locked)
Key takeaways2m 12s
-
(Locked)
-
-
-
-
-