IP Pre Practical Test
IP Pre Practical Test
Q.1 Write a program in python to create the following Data Frame named “stu_data”
storing the details of students.
Considering the above data frame answer the following queries by appropriate
command in python pandas.
i. Create the CSV file from the above dataframe named stu_data.csv.
ii. Display row index and row value for each row given by iterrow()for the given
dataframe.
iii. Now plot Multibar graph of students marks from the above data frame.
Q.2 Write a program in python to create the following Data Frame named “emp” storing
the details of students.
Considering the above data frame answer the following queries by appropriate
command in python pandas.
iv. Add a Row with row index 108 as Smit,32, Bilimora, 30000.
v. Display column index and column value for each column given by iteritem()for
the given dataframe.
vi. Now plot bar chart depicting the employee name on X- axis and their
corresponding salary on Y- axis, with appropriate graph title.
Q.3 Write a program in python to create the following Data Frame named “Stu_data”
storing the details of students.
Considering the above data frame answer the following queries by appropriate
command in python pandas.
i. Find the average marks of the students.
ii. Add a Column with Column index Physics as 77,45,56,57,67,55,54.
iii. Now plot Multiline graph depicting student name on X-axis and their marks on
Y-axis with appropriate graph title.
Q.4 Write a program in python to create the following Data Frame named “emp” storing
the details of students.
Considering the above data frame answer the following queries by appropriate
command in python pandas.
i. To display the first 3 values.
ii. To display the last 3 values.
iii. To generate histogram graph with range(0,5,10,15,20,25,30,35) and
experience(4,12,15,12,13,34,22,37)
Q.5 Create below table “Furniture” and insert all records.
FCODE FNAME PRICE MANUFDATE WCODE
10023 Coffee Table 4000 19-DEC-2016 W03
10001 Dinning Table 20500 12-JAN-2017 W01
10012 Sofa 35000 06-JAN-2016 W02
10024 Chair 2500 07-APR-2017 W03
10090 Cabinet 18000 31-MARCH-2015 W02
i. To display the FCODE as primary key.
ii. To display FCODE, FNAME, and PRICE of items that have less than 5000 rs.
iii. To display the details of all the furniture item which have manufacturing date
(MANUFDATE) between 01-JAN-2016 and 15-JAN-2017.
iv. To display the FCODE and FNAME of each furniture item in descending order of
FCODE.
Q.6 Create below table “Student” and insert all records.
ADMNO NAME STREAM OPTIONAL AVERAGE
1001 Ritesh Science IP 90
1002 Aakash Commerce IP 80
1003 Mahima Science PE 60
1004 Lakshy Commerce PE 65
1005 Manu Science IP 70
i. To display the ADMNO as primary key.
ii. To display the details of all those students who have IP as their optional subject
.
iii. To display a name list of all those students who have average more than 75.
iv. To display the name list of all those students who have science as their stream.
Q.7 Create below table “Student” and insert all records.
RollNo NAME STREAM OPTIONAL AVERAGE
11 Aditya Arts IP 70
12 Raghvendra Science IP 90
13 Kenish Science CS 65
14 Nanu Commerce PE 65
15 Manu Science IP 70
i. To display the RollNo as primary key.
ii. To display the distinct value of average from student table.
iii. To give increase of 3 in the average of all those students of science stream who
have IP as their optional subject.
iv. To display the Maximum average of the student.
Q.8 Create below table “furniture” and insert all records.
Code Name Price Manufdate Wcode
1025 Bed 15000 20-JAN-2015 W05
1023 Cupboard 30000 12-FEB-2016 W03
1024 Table 2500 15-MARCH-2015 W05
1029 Dinning Table 8000 31-MARCH-2016 W02
1021 Sofa 35000 07-APRIL-2017 W03
i. To display the Code as primary key.
ii. To display the distinct value Wcode from furniture table.
iii. To display minimum price of furniture.
iv. To display the Maximum price of the furniture..