Series :
-series is one dimensional array defined in pandas library that can be used to store any data type.
Syntax-
pandas.Series(data,index)
Here data can be
1. scalar value like string,integer,float
2. python dictionary
3. Ndarray
-Here index part is optional, by default it is 0,1,2,3,4,......
import pandas
#given dictionary
d={1:'one',2:'two',3:'three'}
#with default index value
ans=pandas.Series(d)
print(ans)
#with index value
ans=pandas.Series(d,index=[4,1,5,2])
print(ans)
1 one
2 two
3three
dtype: object
4NaN
1one
5NaN
2two
dtype: object