Term1 - Practical Examination - Python List of Programs - 2024-25
Term1 - Practical Examination - Python List of Programs - 2024-25
Purchase a Record Note Book One side ruled one (one side plane) [Similar to Physics/Chemistry
Record Book]
Important Instructions:
(a) Start each program on a fresh page. Write neatly and clearly
(b) Write the Program Number
(c) Write the question for each program
(d) It is mandatory to write the output of the program on the left hand side of the program.
(e) For graphs you have to take the printout B/W (or) Color and paste it on the left hand side of
the program.
(f) Write short description of programs in the index
(g) In the index page don’t write the date of experiment
Program List:
1) Program to create a Series Object using a dictionary
2) Program to create a Series object that stores the contribution amount as the values and the
section names as the indexes with datatype as float32. Your school has decided to double
the contribution section wise
3) Program to display the value of Series Object Attributes
4) Program to extract Slices from Series Object
5) Program to modify elements of Series Object using index
6) Program to demonstrate head and tail functions
7) Program to sort Series Values based on Values and Indexes
8) Program to demonstrate Dataframe Attributes / Properties
9) Program to create a dataframe of Survey data with Population, Hospitals and Schools
a) Selecting / Accessing a Column
b) Selecting / Accessing Multiple columns
c) Selecting / Accessing a Subset from a DataFrame using Row/Column Names
i. To access a row
ii. To access multiple rows
iii. To access selective columns
iv. To access range of columns from a range of rows
v. Selecting Rows/Columns from DataFrame using index
vi. Selecting/Accessing Individual Value
vii. Adding/Modifying Rows /Columns values in DataFrames
d) Adding/ Modifying a Row
10) Program to create a dataframe of Student data with Age, Section and Location and perform
a. Modifying a Single cell
b. Deleting and Modifying a Row
c. Deleting rows/columns in Dataframe
d. Renaming Rows/ Columns
11) Program to plot a line chart to depict the changing weekly onion prices for four weeks. Give
appropriate axes labels.
12) Program to plot a bar chart from the medals won by Australia. In the same chart, plot
medals won by India too based on the table given below
Country Gold Silver Bronze Total
Australia 80 59 59 198
India 26 20 20 66
13) Program to plot a bar chart from the medals won by top four countries. Give appropriate
axes labels, chart title and legend. Make sure that bars are separately visible.
Country Gold Silver Bronze Total
Australia 80 59 59 198
England 45 45 46 136
India 26 20 20 66
Canada 15 40 27 82
14) Ajay is doing research work in the field of Environment. For some plotting purpose he has
generated some data as
mu=100
sigma=15
x=mu+sigma*np.random.randn(10000)
y=mu+30*np.random.randn(10000)
Plot the data on a bar stacked horizontal histogram with both x and y
15) Program to read from a CSV file Employee.csv and create a dataframe from it.
Note : You must show both csv file content and dataframe(output) on the output screen
16) Program to read from a CSV file Employee.csv given below and create a dataframe from it
but dataframe should not use file’s column header rather should use own column headings
as EmpID, EmpName, Designation and Salary. Also print the maximum salary given to an
employee
0 1 2 3
0 1001 Sanjay Manager 50000
1 1002 Rakesh Clerk 25000
2 1003 Vishal Analyst 35000
3 1004 Rohan Salesman 30000
4 1005 Mahesh Manager 45000
Note : You must show both csv file content and dataframe(output) on the output screen
17) Program to create the dataframe give below and export the content of this dataframe into
tutor.csv file
Tutor Classes Country
0 Tahira 28.0 USA
1 Gurjyot NaN UK
2 Anusha 41.0 Japan
3 Jacob NaN USA
4 Venkat 40.0 Brazil