If I do the following:
In [1]: import pandas as pd
In [2]: series1 = pd.Series([0, 5, 2, 3])
In [3]: series1
Out[3]:
0 0
1 5
2 2
3 3
dtype: int64
In [4]: series2 = pd.Series([2, 3, 1])
In [5]: series2
Out[5]:
0 2
1 3
2 1
dtype: int64
Then when I add series 1 and 2 together, I get a NaN
at the third row.
In [6]: series1 + series2
Out[6]:
0 2
1 8
2 3
3 NaN
dtype: float64
Without modifying the index of series 2, is it possible to have the summation be:
In [6]: series1 + series2
Out[6]:
0 2
1 8
2 3
3 3
dtype: float64
such that the value of index 3 in series 1 is preserved after summation?