Intro to Data Structures

We’ll start with a quick, non-comprehensive overview of the fundamental data structures in pandas to get you started. The fundamental behavior about data types, indexing, and axis labeling / alignment apply across all of the objects.

Here is a basic tenet to keep in mind: data alignment is intrinsic. The link between labels and data will not be broken unless done so explicitly by you.

We’ll give a brief intro to the data structures, then consider all of the broad categories of functionality and methods in separate sections.

In [1]: import numpy as np

In [2]: np.set_printoptions(precision=4, suppress=True)

In [3]: import pandas as pd

In [4]: pd.set_option('display.precision', 4, 'display.max_columns', 8)

In [5]: pd.options.display.max_rows = 8

In [6]: import matplotlib

In [7]: matplotlib.style.use('ggplot')

In [8]: import matplotlib.pyplot as plt

In [9]: plt.close('all')