Fin Ip
Fin Ip
NAME : S. Vinay
CLASS : XII-G
ROLL NO :
1
2
ACKNOWLEDGMENT:
3
INDEX:
4
Brief Description:
This Employee Management System is a Python-
based GUI project developed using tkinter for
managing employee data efficiently. It leverages
pandas for data handling, matplotlib for data
visualization, and stores employee records in a CSV
file for persistence. The project provides the
following functionalities:
1.Add New Employees: Input employee details
like ID, Name, Position, and Salary and store
them in a CSV file.
2.Display All Employees: View all stored
employee records in a tabular format.
3.Search Employees: Find an employee using their
unique ID.
4.Remove Employees: Delete employee records
by ID.
5.Export Data: Save the current employee data
into a separate CSV file for external use.
6.Data Visualization:
5
o Display employee salaries as a line chart and
bar chart.
o Plot the distribution of employees across
departments using a histogram.
The user-friendly GUI has a slate gray background
with aquamarine text for aesthetics, and it ensures
data consistency and integrity through a file-based
system. This project is useful for small-scale
organizations or educational purposes to understand
GUI programming and data handling in Python.
6
DATA SET:
7
HARDWARE REQUIREMENTS:
8
SOFTWARE REQUIREMENTS:
9
PYTHON:
Python is a high-level, interpreted programming
language known for its simplicity, readability, and
versatility.
10
automation, software development, etc. It has a rich
ecosystem of libraries and frameworks such as
Django for web development, Pandas and NumPy
for data analysis, and TensorFlow for machine
learning, making it incredibly versatile.
11
PANDAS:
Pandas is an open-source Python library primarily
used for data science. It provides powerful, flexible,
and easy-to-use data structures, such
as DataFrames and Series, that make it easy to work
with structured data such as tables and time series.
A DataFrame is a two-dimensional, labeled data
structure that can store data of different types ,such
as integers, strings, floats, in columns, much like a
spreadsheet or SQL table.
Pandas simplifies tasks such as reading and writing
data from various file formats ,for example CSV,
Excel, SQL databases, cleaning and transforming
data, handling missing values, filtering and grouping
data, and performing complex operations such
as merging and joining datasets.
Pandas is widely used in data science, machine
learning, and financial analysis
to efficiently manipulate and analyze large
datasets due to its intuitive syntax and integration
with other scientific libraries such as NumPy and
Matplotlib. Its ability to handle time-series data and
12
perform complex operations on large datasets makes
it a cornerstone of the Python data science
ecosystem.
13
SERIES:
In Pandas, a Series is a one-dimensional labeled
array capable of holding data of any type, such as
integers, floats, strings, or even Python objects.
It is similar to a list or an array, but with the added
benefit of having an associated index, which allows
for more flexible and efficient data manipulation.
Each element in the series is assigned an index,
which can be either a custom label or a default
integer index (starting at 0).
Series objects provide a wide range
of functionality, including mathematical operations,
filtering, and applying functions on an element-by-
element basis. They can be created from a variety
of data sources, including lists, NumPy arrays, or
dictionaries, and are often used to represent a single
column of data in a DataFrame.
14
Series are very efficient for working with one-
dimensional data, and their indexing capabilities
make it easy to access and modify individual items
or subsets of data. In fact, the series is usually used
for tasks such as time -series analysis, data index
creation, or higher datasets, such as extraction
of specific columns.
15
DATAFRAME:
In Pandas, a DataFrame is a two-dimensional labeled
data structure, essentially an array of rows
and columns similar to a spreadsheet or SQL table.
It is the most commonly used object in Pandas for
data science.
The data frame may contain different types of data ,
namely: whole, float, line, etc., in each column, and
each column is displayed as
a series. DataFrames can perform powerful
operations such as data indexing,
filtering, changing, grouping, and fusion.
This is ideal for operating structured data.
They can be created from a variety of data
sources such as CSV files, Excel spreadsheets, SQL
databases, Python dictionaries, etc.
A DataFrame's labels, also known as indexes, make
it easy to reference data by rows and
columns, making it more flexible compared to
traditional tables.
16
DataFrame also supports handling missing data
and allows for vectorized operations, enabling
efficient computations on large data sets. Due
to its intuitive structure and wide range of
capabilities, DataFrame is widely used in data
analysis, machine learning, financial analysis, and
many other fields.
17
CSV:
CSV (Comma Separated Values) is a simple and
widely used file format for storing and exchanging
tabular data.
Each line in the file represents one row, and each
value within a row is separated by a comma.
The format is in plain text, making it easy for
humans and machines to read and write. CSV files
are usually used to display data such as spreadsheets,
databases, and lists, and can be easily opened and
edited with applications such as Microsoft
Excel and Google sheets. Each line in the CSV
file supports data records, and the first row often
contains headlines that determine the column
name. CSV is a popular choice for data exchange
due to its simplicity and compatibility with a wide
range of software, and is supported by most
programming languages, including Python, which
provides libraries such as Pandas to easily read and
write CSV files.
18
Although CSV files do not support advanced
features such as formatting, data types, or data
relationships, their simplicity, ease of use, and
compatibility with many tools and platforms make
them widely used.
19
TKINTER:
20
Due to its efficiency and easy integration with
Python, Tkinter is widely used for
desktop applications including utilities such
as calculators, text editors, and basic tools.
21
MATPLOTLIB:
Matplotlib is a powerful and widely used Python
library for creating static, animated and interactive
visualizations in a variety of forms such as
line graphs, bar charts, histograms, scatter
plots, etc. It provides a flexible and customizable
framework for creating high-quality charts,
graphs, and graphics for visual representation of
data.
The main component of Matplotlib is
the PYPLOT module, which offers
a matrix interface for creating and
manipulating graphs in a simple, intuitive way.
Users can manage all aspects of the plot, from the
style and color of the lines to marks, names and axis.
Library supports various output formats, such
as PNG, PDF, SVG, and interactive format running
on
the web browser or graphic user interface. Matplotli
b is often used in data analysis, scientific research,
and automatic learning, and supports data research,
expression, and interpretation. It easily integrates
22
with other Python libraries such as NumPy for
numerical data and Pandas for working with tabular
datasets, making it an ideal choice for
data visualization in a wide range of domains.
23
SOURCE CODE:
import pandas as pd
import tkinter as tk
from tkinter import messagebox
import matplotlib.pyplot as plt
import csv
Employeedata = {}
df_new = pd.DataFrame(Employeedata,
index=[0])
df = pd.concat([df, df_new], ignore_index=True)
save_data(df)
messagebox.showinfo("Success", "Employee
added successfully!")
df = load_data()
if df.empty:
messagebox.showwarning("No Data", "No
employee data available to export.")
return
file_path = "employee_data_export.csv"
df.to_csv(file_path, index=False)
messagebox.showinfo("Export Success",
f"Employee data successfully exported to
{file_path}")
28
#Function To Display Line Graph of Salaries
def display_salaries_line():
df = load_data()
if df.empty:
messagebox.showwarning("No Data", "No
employee data available.")
return
plt.plot(df['Name'], df['Wage'],
marker='*',color='g')
plt.title('Salaries of Employees (Line Chart)')
plt.xlabel('Employee Names')
plt.ylabel('Salaries')
plt.xticks(rotation=45, ha='right')
plt.tight_layout()
plt.show()
29
def display_salaries_bar():
df = load_data()
if not df.empty:
plt.bar(df['Name'],df['Wage'],color='r')
plt.title('Salaries of Employees')
plt.xlabel('Employee Names')
plt.ylabel('Salaries')
plt.tight_layout()
plt.show()
30
if df.empty:
messagebox.showwarning("No Data", "No
employee data available.")
return
plt.hist(df['Department'], bins=10,
edgecolor='black')
plt.title('Salary Distribution (Histogram)')
plt.xlabel('Salary')
plt.ylabel('Number of Employees')
plt.tight_layout()
plt.show()
31
#Add The Buttons And Add Color, Update Font
tk.Label(root, font=('Times New
Roman',10,'bold'),bg='slate gray',
fg='aquamarine',text="ID:").grid(row=0, column=0)
id_entry = tk.Entry(root,bg='slate gray',
fg='aquamarine')
id_entry.grid(row=0, column=1)
32
Department_entry = tk.Entry(root,bg='slate gray',
fg='aquamarine')
Department_entry.grid(row=2, column=1)
root.mainloop()
OUTPUT SCREEN:
35
36
37
38
39
40
CSV Files:
41
EMP.csv
42
employee_data_export.csv
DATA VISUALISATION:
43
44
45
CONCLUSION:
A GUI-based Employee Management System is a
highly effective solution for modern workforce
management. Its intuitive interface simplifies tasks
such as attendance tracking, payroll processing, and
performance evaluation, reducing the time and effort
required for these operations. By minimizing errors
through automation it ensures data accuracy and
operational efficiency.
The system's ability to present real-time data and
analytics in a visual format aid in better decision-
making, enabling managers to address workforce
needs proactively.
By automating repetitive tasks and creating
transparent processes, the system not only boosts
productivity but also enhances employee satisfaction
and trust.
Ultimately, a GUI-based EMS helps organizations
maintain a well-organized, motivated workforce and
provides a foundation for sustained growth and
efficiency.
46
BIBLIOGRAPHY:
https://pandas.pydata.org/docs/index.html
https://www.scaler.com/topics/matplotlib/
matplotlib-in-python/
NCERT IP Textbook
47