Q. What will be the output of the following code ?


data = np.array(['a1', 'b1', 'c1', 'd1', 'e1'])

s = pd. Series (data, index = [1001,1002, 1003, 1004,1005])

# retrieve multiple elements with labels or index

print(s[[1002,1003,1004]])


Answer :-

1002    b1
1003    c1
1004    d1
dtype: object

Post a Comment

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

Previous Post Next Post