Summing up two Series

Report a typo

Imagine we have two Series, series_a and series_b. Here they are:

A 1
B 2
C 3

Name: series_a, dtype: int64

C 1
B 2
D 3

Name: series_b, dtype: int64

We now define series_c as a sum of series_a and series_b:

series_c = series_a + series_b

What will series_c look like? Select the correct answer:

1.

B   4
C   4

Name: series_c, dtype: int64

2.

A   NaN
B   4
C   4
D   NaN

Name: series_c, dtype: int64

3.

A   1
B   4
C   6

Name: series_c, dtype: int64

4.

A   1
B   4
C   4
D   3

Name: series_c, dtype: int64

Tip: Remember that if two Series have different indexes, the Series for their sum will have the union of their respective indexes.

Select one option from the list
___

Create a free account to access the full topic