From the course: Data Analysis with Python and Pandas
Unlock this course with a free trial
Join today to access over 24,900 courses taught by industry experts.
Solution: Histograms
From the course: Data Analysis with Python and Pandas
Solution: Histograms
- [Instructor] All right, everybody. Our solution code is up on the right. Let's go ahead and dive into the notebook. All right, so let's take a look at what happens if we just plot the histogram on our entire data series. So plot.hist. We will end up with a four series histogram. And so maybe we would set our alpha level equal to 0.3 and we can compare all the distributions in our data here. This is still a lot to really wrap our heads around. So oftentimes with distributional analyses, we might not want to compare more than two or three visually in this way. So if we use the lock method and just grab columns two and three, remember these labels are integers. We can go ahead and just plot the distributions for stores two and three. And we can see that store three has a much higher average distribution than store two. There's only a couple days where the sales of store two approach those of store three, and I can bet you that when store two is high, store three is much, much higher…
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)
-
-
-
-
-