Importing pandas

Every notebook we will use starts by importing pandas and several other useful Python libraries first. It will also set up several options to control how pandas renders output in a Jupyter Notebook. This code consists of the following:

The first statement imports NumPy and refers to items in the library as np.. We won't go into much detail on NumPy in this book, but it is occasionally needed.

The second import makes pandas available to the notebook. We will refer to items in the library with the pd. prefix. The from pandas import Series, DataFrame statement explicitly imports the Series and DataFrame objects into the global ...

Get Learning pandas - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.