July 2, 2017
Out[54]: A aa
B ba
C ca
dtype: object
Out[55]: 0 -0.602030
1 -1.042223
2 -0.132997
3 -0.601916
4 -0.056615
dtype: float64
Out[17]: a 0.348499
b -0.171071
c 1.649969
d -1.276476
e -0.303021
dtype: float64
Out[11]: a 0.0
b 1.0
c 2.0
dtype: float64
In [12]: pd.Series(d, index=['b', 'c', 'd', 'a']) # label shows the order or arrang
1
Out[12]: b 1.0
c 2.0
d NaN
a 0.0
dtype: float64
Out[13]: a 5.0
b 5.0
c 5.0
d 5.0
e 5.0
dtype: float64
Out[21]: 0.3484993615997764
Out[27]: a 0.348499
b -0.171071
c 1.649969
dtype: float64
Out[23]: a 0.348499
c 1.649969
dtype: float64
Out[24]: e -0.303021
d -1.276476
b -0.171071
dtype: float64
In [28]: np.exp(s) # label does not change, only values get exp'ed
Out[28]: a 1.416940
b 0.842761
c 5.206817
d 0.279019
e 0.738584
dtype: float64
In [44]: s + s
2
Out[44]: a 0.696999
b -0.342143
c 3.299937
d -2.552952
e -0.606042
dtype: float64
Out[45]: a True
b True
c True
d True
e True
dtype: bool
Out[37]: -0.30302080406783488
Out[38]: True
In [40]: -0.30302080406783488 in s
Out[40]: False
Out[43]: True
Out[50]: c 1.649969
d -1.276476
e -0.303021
dtype: float64
Out[51]: a 0.348499
b -0.171071
c 1.649969
dtype: float64
In [53]: s.index
In [ ]: