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 is to make sure that we have included all of the necessary Python libraries for all of the tasks that will be performed. This includes matplotlib for graphs, datetime to manage various dates and time in the data, a few methods from NumPy, and random number capabilities from the random library:

In [1]:
   # necessary imports for the workbook
   import pandas as pd
   import pandas.io.data
   import numpy as np
   import datetime
   import matplotlib.pyplot as plt

   # Set some pandas options
   pd.set_option('display.notebook_repr_html', False)
   pd.set_option('display.max_columns', 6)
   pd.set_option('display.max_rows', 10) 
   pd.set_option('display.width', 78) 
   pd.set_option('precision', 4)

   # do all our graphics inline
   %matplotlib inline