Q. What will be the output produced by following code?


Stationery = ['pencils', 'notebooks', 'scales', 'erasers']

S = pd. Series ([20, 33, 52, 10], index = Stationery)

S2 = pd. Series ([17, 13, 31, 32], index = Stationery)

print (S + S2)

S = S + S2

print (S + S2)


Answer =

pencil       37
notebook0    46
scale        83
eraser       42
dtype: int64
pencil        54
notebook0     59
scale        114
eraser        74
dtype: int64

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post