# `pd` is the conventional alias for Pandas, as `np` is for NumPy
@@ -327,8 +417,8 @@ Series
DataFrame
s, Series
, and Indices can be represented visually in the following diagram, which considers the first few rows of the elections
dataset.
Notice how the DataFrame is a two-dimensional object — it contains both rows and columns. The Series above is a singular column of this DataFrame
, namely the Result
column. Both contain an Index, or a shared list of row labels (the integers from 0 to 4, inclusive).
-
-Series
+
+2.2.1 Series
A Series represents a column of a DataFrame
; more generally, it can be any 1-dimensional array-like object. It contains:
- A sequence of values of the same type.
@@ -391,8 +481,8 @@ Series
Index(['first', 'second', 'third'], dtype='object')