IP practical file
(065)
Submitted to : Subhangi mam
Submitted by: Manjari Remesh
Roll no: 25 Class: XII B
Certificate
Index
List of Python programs:
Data handling
Sr No Content/exp Date Pg No Sign
1 Create a panda’s series from a dictionary of values
and ndarray
2 Create a series using lists and write a code to
extract the last 2 and the first 2 values of the series
3 Create three series S1 having Five values, S2
having three values and s3 be the sum of S1 and S2
then sort the values of S3 in ascending order
4 Given a Series, print all the elements that are
above the 75th percentile.
5 Create a data frame for examination result and
display row labels, column labels data types of
each column and the dimensions
6 Filter out rows based on different criteria such as
duplicate rows.
7 Write a Python program to create the Pandas
DataFrame displayed below using a list of
dictionaries.
Course Duration
0 Data Science 12
1 Artificial Intelligence 18
2 Web Development 6
8 Write a Python program to create a Pandas Series
as shown below using a ndarray, where the subject
names are the indices and the corresponding marks
are the values in the series. Mathematics 85
Science 90
English 78
History 88
9 Write a program to create a series with month name
and number of day in each month
10 Create a Series object and display the name of the
employee and the salary drawn
11 Display the numbers from 2 to 20 and it’s square
using Series
12 Number of students in class 11 and 12th in 3
streams – Science, Commerce and Arts are given
with sort series object c11 and c12. Write code to
find total number of students in class 11 and 12 th
stream wise.
13 Create two dataframe dfl and df2 and append them
to create dataframe df3 and then rename the index
14 Write a program to get age,name and qualification
using data frame.
15 Write a program to find weight name and age using
data frame and transpose function
16 Write a program to create data frame and change
the value of one column with a scalar value
17 Write a program that filter out rows based on
different criteria such as duplicate rows, NaN value
Csv files :
1 Create a dataframe from a csv file called job and
show the data of middle employee
2 Using the same csv file above create a dataframe
using name column as index column.
3 Import a dataframe of marks of three students to
csv file using separator '$'.
Visualization:
1 Create a line chart of percentage for two students
and give appropriate label and title.
2 Write a program to plot a bar chart from the medals
won by top four countries. Make sure that bars are
separately visible.
3 Write a program to create a horizontal bar chart for
India’s medal tally(Gold,Silver,Bronze) and Total
[[Link]-252-Q30 solved eg]
4 A survey gathers height and weight of 100
participants 12, 13 and recorded the participants.
Write a program to plot a histogram from the above
data with 20 bins.
List of SQLPrograms:
A Create a table student as follows:
Student_ID Name DOB Gender Address
1 Priya 2008-05-30 F Nerul
2 Aditya 2008-08-01 M Vashi
3 Aman 2008-12-03 M Sanpada
4 Rekha 2008-01-08 F Sanpada
5 Riya 2008-03-19 F Nerul
6 Clera 2008-05-12 F Nerul
7 Manas 2008-06-26 M Vashi
1. Display address and DOB from table and order it
by Gender
2. Display Date from DOB
3. Display only the distinct address
4. Display name and student ID genderwise.
5. Display day no. from DOB column
6. Change the Name column to Student_Name and
display the structure of the table.
7. Add a column name marks and then describe the
new table structure
B Create a table Course Details as follows: Make use
of Foreign key to relate to above table Student
1. Display course name and instructor name from
the table and order it by course name in descending
order.
2. Display instructor name where course name has
either 7 or 10 letters
3. Display start time and end time and order it by
Salary
4. Take the length of every course name and power
it up by 2 and order it by course id in ascending
order.
5. Display substring from column of course name
and display all instructor name in all caps
6. Display period of time course.
7. Take the square root of year of both start year
and end year.
8. Set salary as 30000 where salary is less than
25000 and then display instructor name and salary.
C Consider the following tables:
Table 1:
STUDENT, which stores StudentID, Name and
Class
StudentID Name Class
1 Ankit 12
2 Priya 11
3 Rohan 12
4 Shreya 11
5 Rehan 12
Table 2:
MARKS, which stores StudentID, Subject and
Score
StudentID Subject Score
1 Mathematics 85
2 Physics 78
3 Chemistry 88
4 Biology 81
6 Computer Science 93
Write appropriate queries for the following:
i)List the names of students enrolled in class
11 ,stored in ascending order
ii)Display name of all subjects in uppercase, where
students scored more than 90 marks
iii) Display the names of students along with their
subject and score