IP Revision Term 1 – Quiz 1

Share with others

Welcome to your IP Revision Term 1 - Quiz 1

Q1. Which of the following statement is correct to specify the data type int64 to Series object "S1"?

Q2. Which of the following is not the datatype of Series object?

Q3. Write the output of the following:

import pandas as pd
S1= pd.Series((1,2,3,(1,2)))
print(S1.ndim)

Q4. Write the output of the following :

import pandas as pd
S1= pd.Series((1,2,3,[1, 2]))
print(S1.size)

Q5. Write the output of the following :

import pandas as pd
S1= pd.Series((1,2,3,[1, 2]))
print(S1.nbytes)

Q6. 'itemsize' attribute of Series object is _________________

Q7. Command to display first two elements of Series 'S1' is __________

Q8. Command to display 7th element of Series "S1" is _______________

Q9. Which of the following statement will display same result as displayed by: ?

>>>S1.tail()

Q10. Write the output of the following:

import pandas as pd
D = {"a":{"A":(1,2)},"b":{"B":(5,6)}}
D1= pd.DataFrame(D)
print(D1)


Share with others

Leave a Reply

error: Content is protected !!