Data Structures
tags: #python/pandas
There are two primary data structures of pandas:
| Dimension | Name | Description | Constructor |
|---|---|---|---|
| 1 | Series | A one-dimensional labeled array capable of holding any data type. Essentially a single column (array) of data with an associated index[1]. | pd.Series() |
| 2 | DataFrame | A two-dimensional labeled data structure with columns that can be of different data types. Essentially, a collection of series. | pd.DataFrame() |
![]() |
Distinguishing the Two
We can think of a DataFrame as a spreadsheet where each column is a series.
Axes In a DataFrame
DataFrame Objects is a two-dimensional Data Structure with 2 Axes
A DataFrame object has two axes: “axis 0” and “axis 1”. “axis 0” represents rows and “axis 1” represents columns

Every element in a Series is associated with an index. ↩︎
