During the execution of following code, what will be the response, we get –

8. During the execution of following code, what will be the response, we get -

import pandas as pd
s =pd.Series([1,2,3,4,5],index= ['a','b','c','d','e'])
print(s['f'])
  1. KeyError
  2. IndexError
  3. ValueError
  4. None of the above mentioned

Answer: A) KeyError

Explanation:

We will get "KeyError" during the execution of above mentioned code.

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.