O'Reilly logo

Learning pandas by Michael Heydt

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required