Class Test Xii Ip
Class Test Xii Ip
1. (i)To display First 15 rows of a series object ‘Ser1’and last 2 records you may write: 2
(ii) How does series differ from Dataframe? 2
2. Write a program to create a series object using a dictionary that stores the number of 2
Kendriya Vidyalayas in each city of cities of your state.
Note: Assume some cities like AGRA, JHANSI, MATHURA, NOIDA having 4, 3, 5, 4 KVs respectively
and pandas library has been imported as mypandas.
3. (i) What will be the output of the following code: 2
>>> import pandas as pd
>>> mydata=pd.Series( [‘rajesh’, ‘amit’, ‘tarun’, ‘Radhika’] )
>>> print(mydata < ‘rajesh’ )
(ii) How to install pandas in Python IDLE? 2
4. Consider a given Series , M1. Write a program in Python Pandas to create the series. 2