Professional Documents
Culture Documents
Holy Innocents Public School Term-1
Holy Innocents Public School Term-1
__________________________________________Statement2
30. What is the basic difference between iterrows and iteritems (2)
th
31. Write a code statement to list the value of a cell in the 5 row and “item” column
from a dataFrame “Sales” (2)
32. A dictionary Grade contains the following:
Name Grade
Rashmi A1
Harsh A2
Ganesh B1
Priya A1
Vivek B2
Write Statement for the Following (6)
i) Create DataFrame named “GR”
ii) Add a column called marks with followings data:[99,95,92,89,96,82]
iii) Deleted 3rd and 5th row
33. Assume a DataFrame df1 that contains data about climatic conditional of various
citites with c1, c2, c3, c4 and CS as indexed and give the output of question from (i) to (v)
(4)
a) Df1.shape
b) Df1[1:2]
c) Df1.loc[‘c1’:’c3’,city]
d) Df1.iloc[2]
Section –C
34. Create the following data frame named “emp” storing the following details : (5)
Considering the above data frame answer the following by writing appropriate command (set
of commands) in Python Pandas.
a) Display the details of SALES AND ACCOUNTS department employees.
b) Update the salary of Seema Singh to 100000.
c) Add a new column Bonus just after the column salary which is 15% of their salary.
d) Plot a Bar chart depicting Employee Name on X-axis and their salary and Bonus on Y-axis,
with appropriate Graph Title, X-Axis Title, Y-Axis Title, Legends and color etc.
35. Considering the above data frame answer the following by writing appropriate command
(set of commands) in Python Pandas.
NAME Gender POSITION CITY AGE PROJECTS BUDGET
Rabia F Manager Bangalore 30 13 48
Evan M Programmer New Delhi 27 17 13
Jia F Manager Chennai 32 16 32
Lalit M Manager Mumbai 40 20 21
Jaspreet M Programmer Chennai 28 21 17
Suji F Programmer Bangalore 32 14 10
a) Print the details of the youngest employee in the data frame. (1)
b) Print the details of the employee handling the maximum number of projects. (1)
c) Print the average budget allotted. (1)
d) Plot a Multi Line chart depicting employee-Name on X-axis and their projects and
Budget on Y-axis, with appropriate Graph Title, X-Axis Title, Y-Axis Title, Legends and
color etc. (2)
Considering the above data frame answer the following by writing appropriate
command (set of commands) in Python Pandas.
a) Display Teacher Name, Subject and Salary for all TGT Teachers. (1)
b) Add a row for a PRT teacher, assuming your own data . (1)
c) Plot a Multi Line chart depicting Teacher-Name on X-axis and their salary and
Bonus on Y-axis, with appropriate Graph Title, X-Axis Title, Y-Axis Title, Legends
and color etc. (3)