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.
Challenge: Basic line chart
From the course: Data Analysis with Python and Pandas
Challenge: Basic line chart
- [Instructor] Okay, new email in from Rachel Revenue. Subject line is Oil Price Trends. She writes us, "Hi there, I don't have a good grasp on the trends in oil prices. There are way too many values to understand from table data. Can you plot the oil prices with a simple line chart? Also, if you want to, Google oil price decline 2014 to help understand the big drop in prices, thanks." If we take a look at the results preview, we can see a line chart on the right. This is what we want to create. Let's go ahead and take a quick look at our notebook. All right, so we just want to build a simple line plot for our oil series, and we just want to see if there are any interesting patterns. If you want to dig into what happened to oil prices in 2014, that could be kind of fun, but we're just going to be working with our oil data frame. If you remember, we just have a date column here and we have a price column here. We just want to plot prices by dates, go ahead and give this a shot, 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)
-
-
-
-
-