In [1]:
import pandas as pd
Series
to dict
¶
In [4]:
s = pd.Series(["how", "are", "you"])
s
Out[4]:
In [5]:
s.to_dict()
Out[5]:
dict
to Series
¶
In [8]:
dic = {"how": 0, "are": 2, "you": 1}
dic
Out[8]:
In [9]:
pd.Series(dic)
Out[9]:
In [ ]: