In this chapter, as usual, we will need the NumPy package imported under the alias np, the Matplotlib pyplot module imported as plt, and the Pandas package imported as pd. We can do this using the following commands:
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
We will also need some new packages in this chapter. The statsmodels package is used for regression and time series analysis, the scikit-learn package (sklearn) provides general data science and machine learning tools, and the Prophet package (fbprophet) is used for automatically modeling time series data. These packages can be installed using your favorite package manager, such as pip:
python3.8 -m pip install statsmodels sklearn fbprophet
The Prophet package can prove difficult to install on some operating systems because of its dependencies. If installing fbprophet causes a problem, you might want to try using the Anaconda...