Book Image

Learning Pandas

By : Michael Heydt
Book Image

Learning Pandas

By: Michael Heydt

Overview of this book

Table of Contents (19 chapters)
Learning pandas
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Setting up the IPython notebook


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...