0% found this document useful (0 votes)
16 views1 page

Class Test Xii Ip

Uploaded by

tarujain1120
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views1 page

Class Test Xii Ip

Uploaded by

tarujain1120
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

PM SHRI KENDRIYA VIDYALAYA LALITPUR

MONTHLY TEST - APRIL 2024-25


Class : XII Subject : Informatic Practices Maximum Marks : 20

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

5. Given two series S1 and S2 2


S1 S2
A 39 A 10
B 41 B 10
C 42 D 10
D 44 F 10
Find the output for following python pandas statements?
a. S1[ : 2]*100
b. S1 * S2

6. (i) Consider the commands below: 2


import pandas as pd
lst=[10,20]
ds=pd.Series([10,20])
Here lst is a list and ds is a series. Both have same values 10 and 20. What will be the output of the
following commands? Justify your answer.
a. print ( lst * 2 )
b. print ( ds * 2 )
(ii) Carefully observe the following code: 4
import pandas as pd
D1={'S1': 'India', 'S2': 'Russia', 'S3': 'World'}
D2={'School': 'EOIS', 'Place': 'Moscow'}
data={1:D1,2:D2}
df=pd.DataFrame(data)
print(df)
Answer the following
a. List the index of the DataFrame df
b. List the column names of DataFrame df
c. Output

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy