A scikit-learn program begins with several imports. Within Python, preferably in Jupyter Notebook, load the numpy, pandas, and pyplot libraries:
import numpy as np #Load the numpy library for fast array computationsimport pandas as pd #Load the pandas data-analysis libraryimport matplotlib.pyplot as plt #Load the pyplot visualization library
If you are within a Jupyter Notebook, type the following to see a graphical output instantly:
%matplotlib inline