The name argument allows you to give a name to a Series object, i.e. to the column. So that when you’ll put that in a DataFrame, the column will be named according to the name parameter.
example:
In [1]: s = pd.Series([“A”,”B”,”C”], name=”foo”)
In [2]: s
Out[2]:
0 A
1 B
2 C
Name: foo, dtype: objectIn [3]: pd.DataFrame(s)
Out[4]:
foo
0 A
1 B
2 C
If you don’t give a name to your Series it will be named automatically. Here it will be a 0 in the dataframe object:
0
0 A
1 B
2 C