0% found this document useful (0 votes)
9 views3 pages

IP Pre Practical Test

The document outlines a series of programming tasks in Python using pandas to create and manipulate DataFrames related to student and employee data, as well as furniture records. It includes specific queries such as creating CSV files, plotting graphs, adding rows and columns, and displaying data based on certain conditions. Each question provides a structured approach to data handling and visualization in Python.

Uploaded by

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

IP Pre Practical Test

The document outlines a series of programming tasks in Python using pandas to create and manipulate DataFrames related to student and employee data, as well as furniture records. It includes specific queries such as creating CSV files, plotting graphs, adding rows and columns, and displaying data based on certain conditions. Each question provides a structured approach to data handling and visualization in Python.

Uploaded by

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

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.

Rollno Name Maths Chemistry IP Physics


1 Vivek 40 48 55 45
2 Deep 50 59 65 60
3 Jay 60 68 75 55
4 Kishan 70 75 85 70
5 Harshil 80 80 95 54
6 Aditya 45 60 50 64
7 Harsh 65 72 80 85

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.

EmpId Name Age City Salary


100 Ritesh 25 Mumbai 15000
101 Aakash 26 Goa 16000
102 Mahima 27 Hyderabad 20000
104 Lakshy 23 Delhi 18000
105 Manu 25 Bengaluru 25000
106 Preet 28 Valsad 30000
107 Aaryan 30 Vapi 27000

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.

Rollno Name Maths Chemistry IP


1 Vivek 40 48 55
2 Deep 50 59 65
3 Jay 60 68 75
4 Kishan 70 75 85
5 Harshil 80 80 95
6 Aditya 45 60 50
7 Harsh 65 72 80

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.

EmpId Name Age City Salary


121 Ritesh 25 Mumbai 15000
122 Aakash 26 Goa 16000
123 Mahima 27 Hyderabad 20000
124 Lakshy 23 Delhi 18000
125 Manu 25 Bengaluru 25000

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..

You might also like