The Series index
Let's say we have some monthly income data from a YouTube channel. We create a Series with some values (monthly earnings in USD) in a list, and an index of month abbreviations, also in a list, using a constructor similar to what we've used for DataFrames. Note that we can add a name for the Series using the name
argument:
import pandas as pd income = pd.Series([100, 125, 105, 111, 275, 137, Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 99, 10, 250, 100, 175, 200], Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â index = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 'Jul', &apos...