The first step to plot with pandas data, is to first include the appropriate libraries, primarily, matplotlib. The examples in this chapter will all be based on the following imports, where the plotting capabilities are from matplotlib, which will be aliased with plt
:
In [1]: # import pandas, numpy and datetime import numpy as np import pandas as pd # needed for representing dates and times import datetime from datetime import datetime # Set some pandas options for controlling output pd.set_option('display.notebook_repr_html', False) pd.set_option('display.max_columns', 10) pd.set_option('display.max_rows', 10) # used for seeding random number sequences seedval = 111111 # matplotlib import matplotlib as mpl # matplotlib plotting functions import matplotlib.pyplot as plt # we want our plots inline %matplotlib inline
The %matplotlib inline
line is the statement that tells matplotlib to produce inline...