Example:

>>> s1 = Series([10,20,30], ['A','B','C'])

>>> s2 = Series([4,3,2], ['D','C','B'])

>>> s1

A 10

B 20

C 30

dtype: int64

>>> s2

D 4

C 3

B 2

dtype: int64

>>> s1 + s2

A NaN

B 22

C 33

D NaN

dtype: float64

Note that the type of the series was changed to a float type, in order to accommodate the NaN value. That reflects a limitation of NumPy, which for efficiency uses contiguous arrays of the underlying machine types; these machine types do not contain an NaN value for integer types. So NumPy would have to be made more complex, by storing the mask bits elsewhere.

>>> s1 = Series([10,20,30], ['A','B','C'])

>>> s2 = Series([4,3,2], ['D','C','B'])

>>> s1

A 10

B 20

C 30

dtype: int64

>>> s2

D 4

C 3

B 2

dtype: int64

>>> s1 + s2

A NaN

B 22

C 33

D NaN

dtype: float64

Note that the type of the series was changed to a float type, in order to accommodate the NaN value. That reflects a limitation of NumPy, which for efficiency uses contiguous arrays of the underlying machine types; these machine types do not contain an NaN value for integer types. So NumPy would have to be made more complex, by storing the mask bits elsewhere.