Ip Practical File Class 12 Boards
Ip Practical File Class 12 Boards
SCHOOL
NEW PALAM VIHAR, SECTOR-11O,
GURUGRAM
A Practical le
for
For 2024-2025 Examination
As a part of the Informatics Practices (065)
7
5. Write a program to create a data series and sort the values of
the series object in ascending order of its values.
Write program to perform the following mathematical operations 8
6. on two series objects. I) Addition ii) subtraction iii)
Multiplication iv) Division
Write a program to create a Series using list of marks of 15 9
7. students and display First 5 student’s marks and last 3 student’s
marks from series object.
Write a program to create a panda’s dataframe for the following 10
8. table:
Given a DataFrame df ,Write a program to display only the weight 11
9. of first and third rows
Write a program to create pandas dataframe DF for the above table 12
10. and perform the following operations :
i) Insert a new column gender with values as [‘m’,’m’,’f’]
ii) Delete the row details of 2 from DF.
Sigma=15
X=mu+sigma*numpy.random.randn(10000)
Write a program to plot this data on a horizontal histogram with
this data.
Write SQL queries for the following questions based on the given 22-24
20. table ‘EMPLOYEE’
Write SQL queries for the following questions based on the given 25-28
21. table ‘STU’:
PRACTICAL NO.1
1.Write Python program to create a pandas series to store 5 student’s percentage
using dictionary and print all the elements that are above 75 percentage.
SOURCE CODE :
OUTPUT:
PRACTICAL NO.2
2. Write a python program to create a series object that stores the initial budget
allocated(70000 /- each) for the four quarters of the year Wtr1, Qtr2, Qtr3, Qtr4.
SOURCE CODE :
OUTPUT:
PRACTICAL NO.3
SOURCE CODE :
OUTPUT :
PRACTICAL NO.4
4. Consider the series object s13 that stores the contribution of each section as
shown below
A 6700
B 5600
C 5000
D 5200
Write code to modify the amount of section ‘A’ as 7600 and for section ‘C’ and ‘D’ as 7000.Print
the changed object.
SOURCE CODE:
OUTPUT:
PRACTICAL NO.5
5.Write a program to create a data series and sort the values of the
series object in ascending order of its values.
SOURCE CODE:
OUTPUT:
PRACTICAL NO.6
6. Write program to perform the following mathematical operations on two series
objects. I) Addition ii) subtraction iii) Multiplication iv) Division
SOURCE CODE:
OUTPUT:
PRACTICAL NO.7
7. Write a program to create a Series using list of marks of 15 students and display
First 5 student’s marks and last 3 student’s marks from series object.
SOURCE CODE:
OUTPUT:
PRACTICAL NO.8
8. Write a program to create a panda’s dataframe for the following table:
Name Age
Stud1 Shivam 21
Stud2 Pankaj 23
Stud3 Vikas 22
SOURCE CODE:
OUTPUT:
PRACTICAL NO.9
9. Given a DataFrame df :
SOURCE CODE:
OUTPUT:
PRACTICAL NO.10
10. Write a program to create pandas dataframe DF for the above table and perform the
following operations :
SOURCE CODE:
OUTPUT:
PRACTICAL NO.11
11.Write a program to create a pandas dataframe called df for the following table using
dictionary of list and display the details of students whose percentage is more than 85.
SOURCE CODE:
OUTPUT:
PRACTICAL NO.12
12. Write a program to create pandas dataframe Student for the above table and
demonstrate iterrows and iteritems.
SOURCE CODE:
OUTPUT:
PRACTICAL NO.13
13. Create a DataFrame of your own choice taking some negative values also. Write a
program to replace all negative values by 0.
SOURCE CODE:
OUTPUT:
PRACTICAL NO.14
14. Write a python program to create a dataframe using dictionary of list and display the
following attributes of the dataframe : i) index ii) column ii) axes iv) dimension
SOURCE CODE:
OUTPUT:
PRACTICAL NO.15
15. Write a python program to store the details of Employees such as Employee number,
name, salary into Employee.csv file. Also write a code to read all the details from the
csv file.
SOURCE CODE:
OUTPUT:
PRACTICAL NO.16
16. Write a python program to plot a line chart to depict the changing weekly tomato and
cabbage prices for 5 weeks. Also give appropriate axes label, title and keep marker
style as diamond and marker edge color as ‘red’ for tomato.
SOURCE CODE:
OUTPUT:
PRACTICAL NO.17
17. Write a python program to create a dataframe for subject wise average, save it to a
CSV file. Draw a barchart with a width of each bar as 0.25. Specify different color of
each bar with proper title and axes label.
SOURCE CODE:
OUTPUT:
PRACTICAL NO.18
18. Write a program to plot a multiple bar chart from CSV file for subject wise scores of
class A, class B and class C. Give approprite label, title and color represent each chart
and subjects.
SOURCE CODE:
OUTPUT:
PRACTICAL NO.19
19. Prof. Anupam is doing some research in the field of Environment. For some
plotting purposes, he has generated some data as :
Mu=100
Sigma=15
X=mu+sigma*numpy.random.randn(10000)
Write a program to plot this data on a horizontal histogram with this data.
SOURCE CODE:
OUTPUT:
PRACTICAL NO.20
20. Write SQL queries for the following questions based on the given table
‘EMPLOYEE’ :
21. Write SQL queries for the following questions based on the given table ‘STU’:
7 Dinesh M 15 CS 2012-08-25 82