What is the result of the following code for Series?
s = pd.Series([25,30,35,40])
s = s + pd.Series([45,50,55,60])
What is the result of the following code for Series?
s = pd.Series([25,30,35,40])
s = s + pd.Series([45,50,55,60])
Solution
✅ Correct Option: 3
Adding two pandas Series works element-wise, matching values by index label. Both Series have the default index , so each pair is added directly.
Option 4: this is what + does for Python lists (concatenation), not for pandas Series.
If the index labels did not match, the unmatched positions would give NaN instead of a sum.
Related questions:
2026: 18 May Shift 2