You are on page 1of 2

VEL’S PUBLIC SCHOOL

065-INFORMATICS PRACTICES
DATA HANDLING USING PANDAS AND DATA VISUALIZATION
CYCLE TEST- 2
GRADE : 12 (BIO/IP) MAX MARKS : 20

A.MULTIPLE CHOICE QUESTION: (4X1=4)

1. Which of the following statements for creating a dataframe is valid?


a. df = pd.dataframe(dict1) b. df = pd.Dataframe(dict1)
c. df = pd.dataFrame(dict1) d. df = pd.DataFrame(dict1)
2.To count total no of rows in a dataframe we use
a. count() b. len()
c. values d. all of above
3.What will be the shape of the given dataframe?
5 4 3 2 9
6 4 6 3 7
a. (5,2) b. (2,5) c. (10,) d. (2,)
4.In the given chart, box surrounded with red border is called

a. Data series b. Chart Title c. Markers d. Legend

B.SHORT ANSWER : (6X2=12)

1.What do you mean by data structure?


2.Differentiate between Series and DataFrame.
3.Write statement to create a Series object by passing a list or tuple (Python
sequence) as argument
in Python Pandas.
4.Write the output of the following code:
import numpy as np
import pandas as pd
array1 = np.array([1,2,3,4])
series3 = pd.Series(array1)
print(series3)
5.Find errors from the given code fragments:
df.DataFrame({'S.NO':[1,2,3],'Name':['Sapan','Vivek','Vishal']})
df.rename[{'S.No':'SNO','Name':'Sname'}]
df.index=(1,2,3)
6.What are the basic elements/components of the chart?

C.COMPETENCY BASED QUESTION : (4X1=4)


Mr. Vijay is working in the mobile app development industry and he was comparing
the given chart on the basis of the rating of the various apps available on the play store.

He is trying to write a code to plot the graph. Help Mr. Vijay to fill in the blanks of the
code and get the desired output.
import ________________ as plt #Statement 1
apps=["Arogya Setu","WPS Office","Cam Scanner","WhatsApp","Telegram"]
ps_rating=[3.9,4.5,4.6,4.2,4.3]
plt.__________(apps,ps_rating,color='m',label=”App Rating”) #Statement 2
plt.xlabel("Apps")
plt._____________("Rating") #Statement 3
plt._________ #Statement 4
plt.________ #Statement 5
i) Write the appropriate statement for #statement 1 to import the module.
ii) Write the function name and label name as displayed in the output for #statement 2
and #statement 3 respectively.
iii) Which word should be used for #statement 3?
iv) Write appropriate method names for #Statement 4 to display legends and
#Statement 5 to open the figure.

You might also like