initialize a series
Series
A series is a one-dimensional vector that contains an array of data.
import pandas as pds = pd.Series([1, 2, 3, 4, 5])s0 1
1 2
2 3
3 4
4 5
dtype: int64
The output from the above initialization is a one-dimensional matrix with indexing on integers to allow for accessing specific locations of the array values. We can alter the indexes to our own naming as follows
s = (['a', 'b', 'c', 'd', 'e'])s['a', 'b', 'c', 'd', 'e']