Q:

Idiomatic way to add two pandas Series objects with different indices

I have two Series objects that I would like to add:
s1 = Series([1,1], index=['a', 'b'])
s2 = Series([2.2], index=['x', 'y'])
When I add them, I get a Series with 4 elements with NaN values, but what I want is a Series that is [s1.a + s2.x, s1.b + s2.y].  This seems like it should be possible, because the indices have an ordering.
I can get what I want from pd.Series(s1.values + s2.values), but I'd like to know if there is a function that already operates on the Series objects this way and returns a series, rather than having to go down to numpy.

A:

Depends on what do you want for the final index:
In [20]:

s1+s2.values
Out[20]:
a    3
b    3
dtype: int64
In [21]:

s2+s1.values
Out[21]:
x    3
y    3
dtype: int64

Or even multiindex:
In [22]:
s3=s2+s1.values
s3.index=pd.MultiIndex.from_tuples(zip(s1.index, s2.index))
s3
Out[22]:
a  x    3
b  y    3
dtype: int64

