Pandas Quiz 4

Share with others

Welcome to your Pandas Quiz 4

Q31. We can imagine a Pandas Series as a ____________ in a spreadsheet

Q32. We can assign user-defined labels to the index of the series?(T/F)

Q33. Write the output of the following :

import pandas as pd
series2 = pd.Series(["Kavi","Shyam","Ravi"], index=[3,5,1])
print(series2 > "S")

Q34. Which of the following statement is correct for importing pandas in python?

Q35. What type of error is returned by following statement?

import pandas as pnd
pnd.Series([1,2,3,4], index = ['a','b','c'])

Q36. Which attribute is used to give user defined labels in Series?

Q37. Fill in the blank to get the ouput as 3

import pandas as pnd
S1=pnd.Series([1,2,3,4], index = ['a','b','c','d'])
print(S1[___________])

Q38. Write the statement to get NewDelhi as output using positional index.

import pandas as pd
S1 = pd.Series(['NewDelhi', 'WashingtonDC', 'London', 'Paris'],
index=['India', 'USA', 'UK', 'France'])

Q39. We can access elements in Series by using ___________ index and ____________index.

Q40. Write the output of the following :

import pandas as pd
S1 = pd.Series(['NewDelhi', 'WashingtonDC', 'London', 'Paris'],
index=['India', 'USA', 'UK', 'France'])
print(S1['India','UK'])


Share with others

Leave a Reply

error: Content is protected !!