Practical File XII IP 2024-25
Practical File XII IP 2024-25
SERIES
2. To write a Python program to create a Series object that stores the Initial budget
allocated (50000/- each) for the four quarters of the year: Qtr1, Qtr2, Qtr3 and Qtr4.
3. To write a Python program to create a Series object that stores the Employee names
as index and their Salary as values.
4. To Write a Python program to create a Series object with Employee names as the
index and their salaries as values. Accept the name of the employee whose salary needs
to be changed, along with the new salary, and update it in the Series.
6. To write a Python program to create two series i.e. population and average income of
Four Zones, and then calculate per capita income storing in third pandas series print it.
7. To write a Python program to create a Series using list and display the following
attributes of the Series: (i) index (ii) dtype (iii) size (iv) shape (v) hasnans
8. To write a Python program to create a Series using list of Marks of 10 students and
display first 5 Students’ marks and Last 2 Students’ marks from Series object.
DATAFRAME
9. To write a Python program to create a panda’s Data Frame for the following table
Using Nested list
Page 1 of 6
10. To write a Python program to create a panda’s DataFrame called DF for the
following table Using Dictionary of List and perform the following operations:
(ii) To Display the row details of 'AP' and 'OD' from DataFrame DF.
(iii) To Display the column 'Books' and 'Uniform' for 'M.P' and 'U.P' from DataFrame DF.
11. To write a Python program to create a panda’s DataFrame called DF for the
following table Using Dictionary of List and perform the following operations:
(i) Insert a new column “Bags” with values as [5891, 8628, 9785, 4475].
13. To write a Python program to create a panda’s DataFrame called DF for the
following table using Dictionary of List and display the details of students whose
Percentage is more than 85.
14. To write a Python program to create a DataFrame using Dictionary of list and
display the following attributes of the DataFrame: (i) index (ii) columns (iii) axes (iv)
dtypes (v) shape (vi) dimension (vii) T
15. To write a Python program to create a panda’s DataFrame called Students for the
following table and demonstrate iterrows and iteritems.
16. To Write a Python program to store the details of Employess’ such as Empno,
Name, Salary into a Employee.csv file. Also, write a code to read employee details from
csv file.
17. To write a Python program to plot a Line chart to depict the changing weekly Onion
and Brinjal prices for four weeks. Also, give appropriate axes labels, title and keep
marker style as Diamond and marker edge color as ‘red’ for Onion.
18. To write a Python program to create a DataFrame for subject-wise average, save it
to a CSV file, and then draw a bar chart using Matplotlib with a width of each bar as
Page 3 of 6
0.25, specifying different colors for each bar. Additionally, provide a proper title and
axes labels for the bar chart.
19. To write a Python program to plot a multiple bar chart From CSV file using
Matplotlib for subject wise Scores of Class A, Class B, and Class C. Different colors
represent each class, and subjects include English,Accountancy,Economics,BST and
IP. Proper labels, a title and a legend are displayed on the chart.
20. To write a Python program to plot a Histogram for the following class interval or
range. Also, give appropriate axes name, title and edege color as ‘red’.
SQL
SQL Queries
21. With reference to the following relations (tables) EMPLOYEE and JOB complete all
the queries in your practical file.
Create following tables EMPLOYEE and JOB such that Empno and Sno are not null
and unique, name is never blank, Area and Native place is valid, hobby, dept is not
empty.
Table: EMPLOYEE
Page 4 of 6
1. Show empno, name and salary of those who have Sports as hobby.
7. Show the appointment date and native place of those whose name starts with ‘A’ or
ends in ‘d’.
8. Show the salary expense with suitable column heading of those who shall retire after
20-jan-2006.
9. Show an additional burden on the company in case the salary of employees having a
hobby as sports, is increased by 10%.
11. Show how many employee shall retire today if maximum length of service is 20
years.
12. Show those employee name and date of birth who have served more than 17 years
as on date.
13. Show names of those who earn more than all of the employees of Sales dept.
14. Show names of those who earn more than at least one of the employees of
Marketing dept.
Page 5 of 6
15. Increase salary of the employees by 5 % of their present salary with hobby as Music
or they have completed atleast 3 years of service.
18. To display the maximum, minimum, sum and average salary of each department.
20. To display employees name, salary and Area of all the employees working in Agra
21. Add a new tuple(row) in the table essentially with hobby as Music.
23. Create a table with values of columns empno, name, and hobby.
24. Erase the records of employee from job table whose hobby is not Sports.
Page 6 of 6