Python has several data structures already, such as tuples, lists, and dictionaries. Pandas provides two main structures to facilitate working with data: Series and DataFrame. The Series and DataFrame data structures each contain another pandas data structure, which is very important to be aware of: Index. However, in order to understand the pandas data structures, we need to take a look at NumPy, which provides the n-dimensional arrays that pandas builds upon.
For the remainder of this book, we will refer to DataFrame objects as dataframes, Series objects as series, and Index objects as index, unless we are referring to the class itself.
The aforementioned data structures are created as Python classes; when we actually create one, they are referred to as objects or instances. This is an important distinction, since, as we will see, some actions can be...