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

Importing pandas


Importing pandas into your application is simple. The following code is a fairly standard convention that is used:

In [1]:
   # bring in NumPy and pandas
   import numpy as np
   import pandas as pd

Importing of both NumPy and pandas is fairly common, with their objects mapped into the np and pd namespaces, respectively. It is also common to import several classes from pandas into the global namespace, but for the purpose of this text, we will explicitly reference all objects through the pd namespace prefix.

pandas also provides several options that can be set to control the formatting of output. The notebooks in this book will use the following code or a slight variant to control the representation of the rendering, as well as setting a maximum number of rows and columns to be displayed in the output any code example.

In [2]:
   # Set some pandas options for controlling output display
   pd.set_option('display.notebook_repr_html', False)
   pd.set_option('display.max_columns...