You are on page 1of 16

CHINMAYA VIDYALAYA

PALLAVUR

PROJECT REPORT ON
EMPLOYEMENT MANAGEMENT SYSTEM
AS PART OF INFORMATICS PRACTICES [065]
CLASS XII

Submitted by: Submitted to:


Sreya. K Mrs.K.Usha Baburaj
CERTIFICATE

This is to certify that the Informatics Practices Project work title “EMPLOYEE
MANAGEMENT SYSTEM” is a bonafide work done by Sreya. K of class XII
of Chinmaya Vidyalaya Pallavur under the guidance and supervision of Mrs
K.Usha Baburaj during the academic year 2022-23.

Signature of Signature of
INTERNAL EXAMINER EXTERNAL EXAMINER

Signature of Principal
ACKNOWLEDGEMENT

I would specially thank Mrs K .Usha Baburaj, our informatic practices


teacher for providing her valuable guidance, suggestions and comments
throughout the course of project.

I would also like to express my sincere gratitude to our Principal Mr.


Jayan Kambrath for providing an opportunity to work of investigatory
project on the topic “Employee management system”
TABLE OF CONTENTS

1. About the project

2. Short description of the modules

3. Implementation

4. Output screenshots

5. Limitations

6. Requirements and Bibliography


About the Project

This project is based on maintaining employee details of an


organisation. The main process includes adding, updating, analysing
and visualizing the employees data.

The project includes various functions of python pandas and CSV


libraries to perform various task as mentioned.
Short description of the modules
Pandas
Pandas is an open-source library that is made mainly for working with relational
or labelled data both easily and intuitively. It provides various data structures and
operations for manipulating numerical data and time series. This library is built
on top of the NumPy library. Pandas is fast and it has high performance &
productivity for users.
Advantages
 Fast and efficient for manipulating and analysing data.
 Data from different file objects can be loaded.
 Easy handling of missing data (represented as NaN) in floating point as well as non-
floating-point data
 Size mutability: columns can be inserted and deleted from DataFrame and higher
dimensional objects

CSV:
A CSV file (Comma Separated Values file) is a type of plain text file that uses
specific structuring to arrange tabular data. Because it's a plain text file, it can
contain only actual text data—in other words, printable ASCII or Unicode
characters. The structure of a CSV file is given away by its name
MATPLOTLIB
Matplotlib is a comprehensive library for creating static, animated, and
interactive visualizations in Python. Matplotlib makes easy things easy and hard
things possible.
 Create publication quality plots.
 Make interactive figures that can zoom, pan, update.

Customize visual style and layout.


IMPLEMENTATION
Empcode name dob Designation
BasicsalaryallowancesdeductionsNetSalary
7845 sreya ######## CEO 300000 3000 100 302900
8945 sankar ######## manager 100000 1000 90 100910
5613 nibha ######## CA 150000 1500 100 151400
8934 bhagaval ######## sales manager30000 1000 90 30910
6385 suhail ######## sales man 10000 1000 80 10920

SOURCE CODE:

import pandas as pd
import matplotlib.pyplot as plt

def main_menu():
print("\n------- Employee Management System -------\n")
print("1. Create/Import New Dataframe")
print("2. Employee Data Analysis")
print("3. Import Data Visualisation")
print("4. Export Dataframe to csv file")

def create_dataframe_menu():
print("\n------- Create Dataframe -------\n")
print("1. Create Dataframe")
print("2. Import Dataframe from csv file")
print("3. Add/Modify Custom Index")
print("4. Add/Modify Custom Column Head")
print("5. Return to main menu")

def analysis_menu():
print("\n------- Data Analysis using Python -------\n")
print("1. Display All records")
print("2. Print All records in order of Name")
print("3. Display employees with maximum Salary")
print("4. Display employees with minimum Salary")
print("5. Display employees who have less basic salary")
print("6. Print distinct designation")
print("7. Add a row to Dataframe")
print("8. Delete a row from Dataframe")
print("9. Return to main menu")

def visualisation_menu():
print("\n------- Visualisation using Matplotlib -------\n")
print("1. Plot line graph (Employees wise Salary)")
print("2. Plot Bar graph (Employees, Salary)")
print("3. Return to main menu")

cols =
['Empcode','name','dob','Designation','Basicsalary','allowances','deductions','NetSalary']
df = pd.DataFrame([],columns = cols)
while True:
main_menu()
ch = int(input("Select Option: "))
if ch == 1:

create_dataframe_menu()
ch = int(input("Select Option: "))
if ch == 1:
data = []
while True:
ch = input("Add Row [y/n]")
if ch.lower() == 'y':
ecode = int(input("Employee Code: "))
name = input("Employee Name: ")
dob = input("DOB in dd-mm-yyyy format: ")
desg=input("Designation:")
basicsal = int(input("Basic salary: "))
allow = float(input("Allowances: "))
deduction = float(input("Deductions: "))
netsal = (basicsal+allow)-deduction
data.append([ecode, name, dob,desg, basicsal,allow,deduction,netsal])
else:
break
df = pd.DataFrame(data, columns = cols)
elif ch == 2:
file = input("File name: ")
df = pd.read_csv(file)
elif ch == 3:
index_list = input("Index List: ").split(",")
df.index = index_list
elif ch == 4:
column_list= input("Column List: ").split(",")
df.columns = column_list
print(df)

elif ch == 2:
while True:
analysis_menu()
ch = int(input("Select Option: "))
if ch == 1:
print(df)
elif ch == 2:
print(df.sort_values(by='name'))
elif ch == 3:
print(df[df['Basicsalary'] == df['Basicsalary'].max()])
elif ch == 4:
print(df[df.Basicsalary == df["Basicsalary"].min()])
elif ch == 5:
print(df[df['Basicsalary']<= 1000])
elif ch == 6:
print(df['designation'].unique())
elif ch == 7:
while True:
ch = input("Add Row [y/n]")
if ch.lower() == 'y':
ecode = int(input("Employee Code: "))
name = input("Employee Name: ")
dob = input("DOB in dd-mm-yyyy format: ")
desg=input("Designation:")
basicsal = int(input("Basic salary: "))
allow = float(input("Allowances: "))
deduction = float(input("Deductions: "))
netsal = (basicsal+allow)-deduction
df = df.append({"Empcode": ecode, "name":name,
"dob": dob, "Designation": desig, "Basicsalary": basicsal,
"sllowances": allow, "deductions": deduction,
"NetSalary": netsal}, ignore_index=True)
else:
break
elif ch == 8:
print("1. Delete Row by Index")
print("2. Delete Row by Empcode.")
ch = int(input("Select Option: "))
if ch == 1:
idx = int(input("Index to delete: "))
df = df.drop(index = idx)
elif ch == 2:
admn = int(input("Empno to delete: "))
df = df.drop(df[df["admn"] == admn].index)
else:
print("Wrong Option Selected! ")
elif ch == 9:
print("Returning to main menu")
break
else:
print("Returning to main menu")
break
elif ch == 3:
while True:

visualisation_menu()
ch = int(input("Select Option: "))
if ch == 1:
plt.plot(df['name'], df['Basicsalary'], label='Basic Salary', color = "blue",
marker="*")
plt.plot(df['name'], df['allowances'], label='Allowance', color = "green",
marker="*")
plt.plot(df['name'], df['deductions'], label='Deduction', color = "purple",
marker="*")
plt.xlabel("Employee", fontsize=12)
plt.ylabel("Net Salary", fontsize=12)
plt.title("Desigation Wise Salary of Employee", fontsize=16)
plt.legend()
plt.show()
elif ch == 2:
x_values = df["name"]
y_values = df['Netsalary']
plt.bar(x_values, y_values, color = 'orange')
plt.xlabel("Employee", fontsize=12)
plt.ylabel("NetSalary", fontsize=12)
plt.title("Employee - Pay Slip Visualisation", fontsize=14)
plt.show()
elif ch == 4:
x_values = df["name"]
y_values = df["Designation"]
plt.barh(x_values, y_values, color = 'magenta')
plt.xlabel("Employees", fontsize=12)
plt.ylabel("Designation", fontsize=12)
plt.title("Employees - Designation Visualisation", fontsize=16)
plt.show()
elif ch == 3:
print("Returning to main menu")
break
else:
print("Wrong Option Selected! ")
elif ch == 4:

file = input("File name: ")


df.to_csv(file, index = False)
elif ch == 5:

print("Bye ...")
exit()
else:

print("Error! Wrong option selected. ")


break
OUTPUT:

1. Create dataframe

2. Data Analysis
a) Display all records

b) Print all records in order of name


c) Display employees with maximum salary

d) Display employees with minimum salary

3. Data Visualisation
a) Plot line graph (employees wise salary)

You might also like