0% found this document useful (0 votes)
7 views2 pages

Lab 3

The document outlines a lab exercise for a BTech course on Data Analysis using Python, focusing on the use of the pandas library for data manipulation. It includes instructions for various tasks such as reading employee data, filtering based on age, comparing salaries by profession, sorting data, predicting missing salaries, and updating records for bonuses. Each task is timed and aims to enhance students' practical skills in data analysis with Python.

Uploaded by

adlof0973
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views2 pages

Lab 3

The document outlines a lab exercise for a BTech course on Data Analysis using Python, focusing on the use of the pandas library for data manipulation. It includes instructions for various tasks such as reading employee data, filtering based on age, comparing salaries by profession, sorting data, predicting missing salaries, and updating records for bonuses. Each task is timed and aims to enhance students' practical skills in data analysis with Python.

Uploaded by

adlof0973
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

School of Computer Science Engineering and Technology

Course- BTech Type- Specialization Core


Course Code- CSET214 Course Name- Data Analysis using Python
Year- 2025-26 ODD Semester- Odd
Date-06-08-25 Batch-

Lab # No. (3)


Working with data frames using pandas, Data Types associated with pandas,
Creating and working with data frames.

CO Mapping
Exp No. Name CO1 CO2 CO3
3 Data Frames ➹ -- --

Introduction: Pandas is a Python library which is used to analyse data. pandas is a software library written
for the Python programming language for data manipulation and analysis. In particular, it offers data
structures and operations for manipulating numerical tables and time series.
https://www.w3schools.com/python/pandas/default.asp

Instruction: Read the ‘Employee_list’ file using pandas and implement following questions.

Qus. 1. A Company has list of employees which is listed in given dataset. The owner wants to use the
Employee id as the default index instead of Sno. Kindly write a python code for owner. (Time 15 Min)
Expected output:

Now company wants to give a bonus to those employees whose age is between 29 and 40 (inclusive). Write a
program to find those employee names.

Qus 2: Write a program to print the percentages for Engineer vs. Doctor having total salary? Call this
method compare_professionand return the result as a DataFramewith a row for Engineer and a row for
Doctor with the column "% of total Salary". (Time 15 Min)
School of Computer Science Engineering and Technology
Qus 3: The data is not arranged properly. Arrange the data in ascending order of employees age and save the
details of first 5 younger employees in New_Data.csv.(Time 15 Min)

Expected Output:

Qus 4: The assistant of the company has missed to enter the salary of some employees. Now help him to
predict the salary of those employees so that he can use the data for analysis. Consider the mean of salary to
complete the data. (Time 15 Min)
Expected Output:

Qus 5. Owner is not approving your interpreted salary. He decided to fire those employees whose salary
was not entered in the dataset. Write a code to help owner. (Time 15 Min)
Expected Output

Qus 6. The company has an event, so the management team has decided to provide extra 1,000 rs. to all
doctors as they have helped in covid duration. Write the python code to help the HR to prepare the data and
print the updated details of doctors. (Time 15 Min)

You might also like