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 (MAT/IP) MAX MARKS : 20

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

1. Which of the following is not true about dataframe?


a. A dataframe object can be created by passing dictionaries.
b. A dataframe is size immutable.
c. A dataframe index can be string.
d. A column of dataframe can have data of different types.
2.Which of the following is Missing data?
a. NULL b. NaN c. None d. All Above
3.Look at this image and identify the file type
Rollno,Name,Class
1,Sanjay,12
2,Raman,12
a. MySQL b. Dataframe c. CSV d. Excel
4.in the given chart, box surrounded with red color is called

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

B.SHORT ANSWER : (6X2=12)

1.Why do you need to use Pandas?


2.Differentiate positional index and labeled index?
3.Write statement to create a Series object by passing (a) string and (b) List of Strings
as an argument
in Python Pandas.
4.What will be the output of following code:
dt=({'Name':['Akshit','Bharat','Chetan','Dhaval','Gaurang'],
'InternalMarks':[18,19,20,18,19],
'AnnualExam':[76,78,80,76,73]})
df=pd.DataFrame(dt)
print(df.iloc[0:2,0:2])
5.Write steps to plot your data on a graph.
6.Plot following data on bar graph:
English: 56,78,90,34
Science: 65,77,54,32
Maths: 45,67,43,41

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


Mrs. Namrata is a coordinator in the senior section school. She represented data on
number of students who passed the exam on line chart as follows:

She has written the following code but not getting the desired output. Help her by
correcting her code.

import matplotlib.pyplot as plt


classes=["X A","X B","XI A","XI B","XII A","XII B"]
no_of_boys=[23,22,20,26,33,30]
no_of_girls=[17,10,20,12,5,8]
plt.line(classes,no_of_boys) #Statement 1
plt.line(classes,no_of_girls) #Statement 2
plt.xtitle("No of Stduents") #Statement 3
plt.ytitle("Classes") #Statement 4
plt.show()

i) What will be the correct code for Statement 1 and Statement 2?

ii) What is the correct function name for Statement 3 and Statement 4?

iii) Write a method and parameter required to display legends?

iv) Write to save the figure as an image.

You might also like