Creating Series
A Series can be created and initialized by passing either a scalar value, a NumPy ndarray, a Python list, or a Python Dict as the data parameter of the Series constructor. This is the default parameter and does not need to be specified if it is the first item.
The index parameter of the constructor assigns a user defined index to the Series that functions similar to a database index. This index provides a means to look up elements in the Series by index label and not by the elements' position in the array.
If you do not specify an index at the creation of a Series, the Series object will construct an index automatically using integer values starting from zero and increasing by one for each item in the Series.
The simplest means of ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access