1. Learn
  2. /
  3. Courses
  4. /
  5. ARIMA Models in Python

Exercise

Exploration

You may make plots regularly, but in this course, it is important that you can explicitly control which axis different time series are plotted on. This will be important so you can evaluate your time series predictions later.

Here your task is to plot a dataset of monthly US candy production between 1972 and 2018.

Specifically, you are plotting the industrial production index IPG3113N. This is total amount of sugar and confectionery products produced in the USA per month, as a percentage of the January 2012 production. So 120 would be 120% of the January 2012 industrial production.

Check out how this quantity has changed over time and how it changes throughout the year.

Instructions

100 XP
  • Import matplotlib.pyplot giving it the alias plt and import pandas giving it the alias pd.
  • Load in the candy production time series 'candy_production.csv' using pandas, set the index to the'date'column, parse the dates and assign it to the variable candy.
  • Plot the time series onto the axis ax1 using the DataFrame's .plot() method. Then show the plot.