IP Practical G12
IP Practical G12
IP Practical G12
Grade 12
Practical List
1. Write a program to create a Series object using (a) Scalar Value (b) List (c) ndarray
2. Write a program to create a Series object using a dictionary that stores the number of students
in each section of class 12 in your school[Sections: A,B,C,D,E,F,G,H Strength:
24,23,20,22,22,24,10,15]
3. Write a program to create a Series object that stores the contribution of each section, as shown
below:
Section Contribution
A 4300
B 6500
C 3900
D 6100
Modify the amount of Section A as 3400 and for section C and D as 5000. Print the modified
Series.
4. Write a program to compare the elements of two Series
Series 1 Series 2
0 2 0 1
1 4 1 3
2 6 2 5
3 8 3 7
4 10 4 9
5. Write a program to create a Series that contains the marks of five students in one subject.
Print all marks that are greater than 75.
6. Create a Series temp that stores temperature of seven days in it. Its index should be Sunday,
Monday,..
Write a program to
a. Display temperature of first 3 days.
b. Display temperature of last 3 days.
c. Display all temperature in reverse order like Saturday, Friday,..
d. Display square of all temperature
7. Write a program to create a dataframe quarterly sales where each row contains the quarterly
sales of TV, Fridge and AC. Show the dataframe after deleting the details of AC.
TV Fridge AC
Qtr1 20000 15000 25000
Qtr2 10000 22000 12000
Qtr3 15000 10000 9000
Qtr4 14500 11000 19000
8. Write a program to create a dataframe to store rollnumber, name and marks of five students.
Print the dataframe, along with the number of rows, columns and total elements in the
dataframe and also its transpose.
9. Write a program to create a dataframe which contains Rollnumber, Name, Height, Weight of
5 students. Add a column BMI(Body Mass Index) using appropriate formula.
10. Write a program to create a dataframe AID using the data given below and do the following.
a. Display the books and shoes only
b. Display toys only
c. Display quantity in MP and CG for toys and books.
d. Display quantity of books in AP
11.Consider two series object Staff and salaries that stores the number of people in various
branches and salaries distributed in these branches respectively. Write a program to create
another Series object that stores average salary per branch and then create a dataframe object
from these Series object. After creating dataframe rename all row labels with Branch name.
12. Write a program to create the dataframe sales containing year wise sale figure for five sales
persons in INR. Use the year as column labels and the sales person names as row labels.
14.Write a program to create a dataframe using the following data and store it into a csv file
student.csv without row labels and column labels.
19. The following seat bookings are the daily records of a month from a cinema hall.
124,124,135,156,128,189,200,176,156,145,138,200,178,189,156,124,142,156,176,180,199,154,
167,198,143,150,144,152,150,143
Construct a histogram for the above data with 10 bins.
20. Write a program to create a dataframe for subject wise average, save it to a CSV file and
then draw a bar chart with a width of each bar as 0.25, specifying different colors for each bars.
Additionally, provide a proper title and axes labels for the bar chart.