You are on page 1of 38

INFORMATICS PRACTICES

PROJECT

2023-2024

PAYROLL

STUDENT NAME :- SRIVATHSAN.V


CLASS & SECTION :- XII-B
REGISTRATION NO :-
ROLL NO :- 12241

1
2
ACKNOWLDEGMENT

I would like to express my special thanks to our school


Principal Mrs. Katheeja. J. A and to my IP teacher Mrs.DHIVYA T
for supporting and leading me by providing all
valuable exhortations to do this project on the topic PAYROLL
, which was a great phase for learning out of
the box.

This project involved me doing a lot of research and I came to


learn many things through this project

3
INDEX

S.NO TITLE PAGE.NO


1. BREIF DESCRIPTION OF 5
PROJECT
2. Data-set 6
3. HARDWARE 7
REQUIREMENTS
4. SOFTWARE 8
REQUIREMENTS
5. PYTHON 9
6. PANDAS 10
7. SERIES 12
8. DATAFRAME 13
9. CSV 14
10. MATPLOTLIB 15
11 SOURCE CODE 16
12 OUTPUT SCREEN 27
13 DATA VISUALIZATION 35
14 CSV - BACKENDTABLE 36
15 CONCLUSION 37
16 BIBLIOGRAPHY 38

4
BREIF DESCRIPTION OF PROJECT:
Payroll is the process of paying a company's employees, which
includes tracking hours worked, calculating employees' pay,
and distributing payments via direct deposit to employee bank
accounts or by check.

However, companies must also perform accounting


functions to record payroll, taxes withheld, bonuses, overtime
pay, sick time, and vacation pay. Companies must put aside and
record the amount to be paid to the government for Medicare,
Social Security, and unemployment taxes.

Many companies use software solutions to manage their


payroll. The employee inputs their hours through an API, and
their pay is processed and deposited into their bank accounts.

Payroll management system is a python based project we


have developed payroll management system using python and
csv.

5
DATASET DECLARATION:

This is to declare that the source of the data set used to


make this project report entitled “PAYROLL” is solely
done by Dheeraj srinivas.p of Class XII, Section B,
Registration no ________, Year 2023-2024

6
HARDWARE REQUIREMENTS:
⚫ Modern Operating System:
➢ Windows 7 or 10
➢ Mac OS X 10.11 or higher, 64-bit
➢ Linux: RHEL 6/7, 64-bit (almost all libraries also work in Ubuntu)
⚫ x86 64-bit CPU (Intel / AMD architecture). ARM CPUs are not
supported.
⚫ 4 GB RAM
⚫ 5 GB free disk space
⚫ Active WI-FI adaptor

7
SOFTWARE REQUIREMENTS:
⚫ Python
⚫ CSV

Library Imported:
⚫ pandas
⚫ matplotlib.pyplot
⚫ numpy

Methods:
⚫ input()
⚫ append() .
⚫ Insert()
⚫ DataFrame()
⚫ loc()
⚫ drop()
⚫ rename()
⚫ head()
⚫ dropna()
⚫ exit()
⚫ print()
⚫ max()
⚫ min()
⚫ int()
⚫ str()
⚫ float()
⚫ bar()
⚫ ylabel()
⚫ xlabel()
⚫ title()
⚫ show()

Attribute:

⚫ Iat()

8
PYTHON:
Python is an interpreter, object-oriented, high-level
programming language with dynamic semantics. Its high-level
built in data structures, combined with dynamic typing and
dynamic binding, make it very attractive for Rapid Application
Development, as well as for use as a
Scripting or glue language to connect existing components
together.

Python's simple, easy to learn syntax emphasizes readability


and therefore reduces the cost of program maintenance.
Python supports modules and packages, which encourages
program modularity and code
Reuse. The Python interpreter and the extensive standard
library are available in source or binary form without charge for
all major platforms, and can be freely distributed.

Often, programmers fall in love with Python because of the


increased productivity it provides. Since there is no compilation
step, the edit-test- debug cycle is incredibly fast. Debugging
Python programs is easy: a bug or bad input will never cause a
segmentation fault. Instead, when the interpreter discovers an
error, it raises an exception.

When the program doesn't catch the exception, the interpreter


prints a stack trace. A source level debugger allows inspection
of local and global variables, evaluation of arbitrary expressions,
setting breakpoints, stepping through the code a line at a time,
and so on. The debugger is written in Python itself, testifying to
Python's introspective power.

9
PANDAS:

Pandas is a fast, powerful, flexible and easy to use open


source data analysis and manipulation tool, built on top of
the Python programming language.

In 2008, pandas development began at AQR Capital


Management. By the end of 2009 it had been open sourced,
and is actively supported.today by a community of like-
minded individuals around the world who contribute their
valuable time and energy to help make open source pandas
possible.

➢ Fast and efficient DataFrame object for data


manipulation with integrated indexing.

➢ Tools for reading and writing data between in-memory


data
➢ structures and different formats: CSV and text files,
Microsoft
➢ Excel, SQL databases, and the fast HDFS5 format.

➢ Intelligent data alignment and integrated handling of


missing data:
➢ gain automatic label-based alignment in computations
and easily manipulate messy data into an orderly form.

➢ Flexible reshaping and pivoting of data sets.

➢ Intelligent label-based slicing, fancy indexing, and


subsetting of
➢ large data sets.

10
➢ Columns can be inserted and deleted from data
structures for size mutability.

➢ Aggregating or transforming data with a powerful group


by engine allowing split-apply-combine operations on
data sets.

➢ High performance merging and joining of data sets.

➢ Hierarchical axis indexing provides an intuitive way of


working
➢ with high-dimensional data in a lower-dimensional data
structure.

➢ Time series-functionality: date range generation and


frequency
➢ conversion, moving window statistics, date shifting and
lagging.
➢ Even create domain-specific time offsets and join time
series
➢ without losing data.

➢ Highly optimized for performance, with critical code


paths written in Cython or C.

➢ Python with pandas is in use in a wide variety of


academic and
➢ commercial domains, including Finance, Neuroscience,
➢ Economics, Statistics, Advertising, Web Analytics, and
more.

11
SERIES:

Pandas Series is a one-dimensional labelled array


capable of holding data of any type (integer, string,
float,python objects, etc.).In the real world, a Pandas
Serieswill be created by loading the datasets from
existingstorage, storage can be SQL Database, CSV file,
andExcel file. Pandas Series can be created from the
lists,dictionary, and from a scalar value etc.There are
two ways through which we can access element of
series, they are :
● Accessing Element from Series with Position
● Accessing Element Using Label (index)

Accessing Element from Series with Position :


In order to access the series element refers to the index
number. Use the index operator [ ] to access an element
in a series. The index must be an integer. In order to
access multiple elements from a series, we use Slice
operation.

Accessing Element Using Label (index) :


In order to access an element from a series, we have to
set values by index label. A Series is like a fixed-size
dictionary in that you can get and set values by index
label.

12
DATAFRAME:

A DataFrame is a two-dimensional tabular data structure


provided by the Pandas library in Python. It resembles a
table or spreadsheet, consisting of rows and columns.

Each column represents a variable or attribute,while


each row represents an individual observation or record.
DataFrames are widely used for data analysis and
manipulation due to their flexibility and functionality.
They allow users to easily access, filter, sort, merge, and
aggregate data.

With DataFrames, specific rows or columns can be


selected, calculations can be performed, and operations
can be applied to subsets of data. Pandas DataFrames
are suitable for handling various types of data, such as
numbers, strings, or dates.

13
CSV:

CSV (Comma-Separated Values) is a simple and widely


used file format for storing and exchanging tabular data.
It provides a way to represent structured data in a plain
text format,where each line in the file represents a row
of data, and the values within each row are
separated by commas.

CSV files are commonly used for data storage,data


interchange, and data analysis tasks. They offer a
lightweight and easy-to-understand format for
representing structured data, making them compatible
with various software applications and programming
languages. The first row typically contains the column
headers or field names, indicating the information
represented in each column. Subsequent rows contain
the actual data values, with each value separated by a
comma; values can be of different types.

14
MATHPLOTLIB:

Matplotlib is a Python library widely used for data


visualization and plotting. It provides a comprehensive
set of tools for creating high-quality graphs, charts, and
plots to visually represent data.

With Matplotlib, users can generate various types of


plots, including line plots, scatter plots, bar plots,
histograms, and more. These plots help in
understanding patterns, trends, and relationships within
the data.

Matplotlib offers extensive customization options,


allowing users to modify colours, labels, axes, and
annotations to create visually appealing and informative
plots. The library integrates well with other Python
libraries, such as NumPy and Pandas, commonly used in
data analysis and scientific computing.

15
SOURCE CODE:

import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
payroll=pd.read_csv(r'E:\python learning\ip final\ip project final')
print("1 Displaying employee's details")
print("2 Displaying employee's salary details")
print("3 Add employee")
print("4 Add more information")
print("5 Displaying specific information about the employees")
print("6 Add Special Allowance")
print("7 Add Promotion")
print("8 Add Bonus")
print("9 Add Spot Bonus")
print("10 Display information about specific employee")
print("11 Fire employee")
print("'12 Display employee details of specific grade")
print("13 Find the high salaried")
print("14 Low salaried")
print("15 Grade System Visualization")
print("16 Quit")
for x in range(10):
a=int(input('Enter the option(1-16)'))
if(a==1):
print(pd.DataFrame(payroll,columns=['Employee code’,
Employee_Name','Employee Surname','DOB','Date_of
Joining','Designation','Grade'],index=[1,2,3,4,5,6,7,8,9,10]))
elif(a==2):
print(pd.DataFrame(payroll,columns=['
Employee_Name',"PF_No","PAN","Bank_Name","Account
No","Basic_Salary","House Rent Allowance","Medical
Allowance","Travel Allowance","Lunch Allowance","Bus
Deduction","PF","Gross_Earnings","Gross_Deduction","Net
Pay"],index=[1,2,3,4,5,6,7,8,9,10]))
elif(a==3):
s=int(input('Employee code:'))
d=str(input('Employee name(in caps):'))
f=str(input('Employee surname(in caps):'))

16
g=int(input('D.0.B(ddmmyyyy):'))
h=int(input('Date of Joining(ddmmyyyy):'))
j=str(input('PF No.:'))
k=str(input('PAN:'))
l=str(input('Bank Name:'))
z=int(input(" Account No.:"))
x=float(input('Basic Salary:'))
v=float(input('Medical Allowance:'))
b=float(input(" Travel Allowance:"))
n=float(input('Lunch Allowance:'))
m=float(input('Bus Deduction:'))
c=(x)/2
q=(x)*0.125
w=v+b+n+x
e=m+q
r=w-c
y=pd.DataFrame({'Employee code':s,'Employee
Name':d,'Employee Surname':f, 'DOB':g,'Date_of
Joining':h,'Designation':hg,'Grade':ag,"PF No":j,"PAN":k,"Bank
Name":1,"Account _No":z,"Basic_Salary":x,"House Rent
Allowance":c,"Medical Allowance'":v,"Travel
Allowance":b,"Lunch_Allowance":n,"Bus_Deduction":m,"PF":q,"Gross_E
arnings":w,"Gross_Deduction":e,"Net_Pay":r},index=[11])

u=pd.DataFrame(payroll,index=[1,2,3,4,5,6,7,8,9,10],columns=['Employe
e_code','Employee Name','Employee_Surname','DOB','Date of
Joining','Designation','Grade',"PF_No","PAN","Bank_Name","Account_N
o","Basic_Salary","House_Rent_Allowance","Medical
_Allowance","Travel
Allowance","Lunch_Allowance","Bus_Deduction","PF","Gross_Earnings",
"Gross_Deduction","Net_Pay"])
i=u.append(y)
print(i)
elif(a==4):
df=pd.DataFrame(payroll,index=[1,2,3,4,5,6,7,8,9,10])
cn=str(input('Information needed to be added is:'))
po=int(input('enter the position of the column(1-22):'))
el=str(input('Employee code 966732:'))
e2=str(input('"Employee code 966733:'))
e3=str(input('Employee code 966734:'))

17
e4=str(input('"Employee code 966735:'))
e5=str(input('Employee code 966736:'))
e6=str(input('Employee code 966737:'))
e7=str(input("Employee code 966738:"))
e8=str(input("Employee code 966739:"))
e9=str(input('Employee code 966740:'))
e10=str(input('Employee code 966741:'))
df.insert(loc=(po-
1),column=cn,value=[el,e2,e3,e4,e5,e6,e7,e8,e9,e10])
print(df)
elif(a==5):
df=pd.DataFrame(payroll,index=[1,2,3,4,5,6,7,8,9,10])
s=int(input('choose the column to be displayed (1-
21):\n1.Employee_code\n2.Employee_Name\n3.Employee_Surname\n4
.DOB\n5.Date_of_Joining\n6.Designation\n7.Grade\n8.PF_No\n9.PAN\n
10.Bank_Name\nl1.Account_No\nl2.Basic_Salary\n13.House_Rent_Allo
wance\n14.Medical_Allowance\nl5.Travel_Allowance\nl6.Lunch_Allowa
nce\n17.Bus_Deduction\n18.PF\n9.Gross_Earnings\n20.Gross_Deductio
n\n21.Net Pay'))
if(s==1) :
print(df[['Employee_Name', 'Employee _code']])
if(s==2):
print(df['Employee Name'])
if(s==2):
print(df['Employee Name'])
if(s==3):
print(df[['Employee_Name','Employee Surname']])
if(s==4):
print(df[['Employee Name','DOB']])
if(s==5):
print(df[['Employee_Name','Employee Surname']])
if(s==6):
print(df[['Employee_Name','Designation']])
if(s==7):
print(df[['Employee_Name','Grade']])
if(s==8):
print(df[['Employee_Name','PF_No']])
if(s==9):
print(df[['Employee_Name','PAN']])
if(s==10):

18
print(df[['Employee Name','Bank Name']])
if(s==11):
print(df[['Employee Name','Account_No']])
if(s==12):
print(df[['Employee Name','Basic_Salary']])
if(s==13):
print(df[['Employee_Name','House Rent Allowance']])
if(s==14):
print(df[['Employee Name','Medical Allowance']])
if(s==15):
print(df[['Employee_Name',' Travel Allowance']])
if(s==16):
print(df[['Employee Name','Lunch_Allowance']])
if(s==17):
print(df[['Employee_Name','Bus_Deduction']])
if(s==18):
print(df[['Employee_Name','PF']])
if(s==19):
print(df[['Employee_Name','Gross_Earnings']])
if(s==20):
print(df[['Employee Name','Gross Deduction']])
if(s==21):
print(df[['Employee Name','Net Pay']])
if(s>21):
print("Check The Number And Run The Program Again!!!")
if(s<1):
print("Check The Number And Run The Program Again!!!")
else:
exit()
elif(a==6):
s-float(input('Amount(in numbers):'))
df=pd.DataFrame(payroll,index=[1,2,3,4,5,6,7,8,9,10])
df['Special_Allowance']=s
df['Gross_Earnings']=df['Gross_Earnings']+s
df['Net_Pay']=df['Net_Pay']+s

print(df[['Employee_Name','Special_Allowance','Gross_Earnings','Net_P
ay']])
elif(a==7):
df=pd.DataFrame(payroll,index=[1,2,3,4,5,6,7,8,9,10])

19
s=int(input('Choose the Employee(1-
10):\n1.XX\n2.YY\n3.ZZ\n4.AA\n5.GG\n6.HH\n7.TT\n8.JJ\n9.LL\n10.SS'))
if(s==1):
df.iat[1,20]=df.iat[1,20]+5000.00
df.iat[1,6]=df.iat[1,6]+1
print(df.loc[['Employee_Name','Grade','Net_Pay']])
if(s==2):
df.iat[2,20]=df.iat[2,20]+5000.00
df.iat[2,6]=df.iat[2,6]+1
print(df.loc[2,['Employee_Name','Grade','Net_Pay']])
if(s==3):
df.iat[3,20]=df.iat[3,20]+5000.00
df.iat[3,6]=df.iat[3,6]+1
print(df.loc[3,['Employee_Name','Grade','Net_Pay']])
if(s==4):
df.iat[4,20]=df.iat[4,20]+5000.00
df.iat[4,6]=df.iat[4,6]+1
print(df.loc[4,['Employee_Name','Grade','Net_Pay']])
if(s==5):
df.iat[5,20]=df.iat[5,20]+5000.00
df.iat[5,6]=df.iat[5,6]+1
print(df.loc[5,['Employee_Name','Grade','Net_Pay']])
if(s==6):
df.iat[6,20]=df.iat[6,20]+5000
df.iat[6,6]=df.iat[6,6]+1
print(df.loc[6,['Employee Name','Grade','Net_Pay']])
if(s==7):
df.iat[7,20]=df.iat[7,20]+5000
df.iat[7,6]=df.iat[7,6]+1
print(df.loc[7,['Employee_Name','Grade','Net_Pay']])
if(s==8):
df.iat[8,20]=df.iat[8,20]+5000
df.iat[8,6]=df.iat[8,6]+1
print(df.loc[8,['Employee Name','Grade','Net_Pay']])
if(s==9):
df .iat[9,20]=df.iat[9,20]+5000
df.iat[9,6]=df.iat[9,6]+1
print(df.loc[9,['Employee Name','Grade','Net_Pay']])
if(s==10):
df.iat[10,20]=df.iatat[10,20]+5000

20
df.iat[10,6]=df.iat[10,6]+1
print(df.loc[10,['Employee Name',' Grade',' Net Pay']])
if(s>10):
print('Check the number and run the program again!!')
if(s<1):
print('Check the number and run the program again!!')
elif(a==8):
df=pd.DataFrame(payroll,index=[1,2,3,4,5,6,7,8,9,10])
s=float(input('Bonus Amount:'))
df['Net_Pay']=df['Net Pay']+s
df['Bonus']=s
df['Gross_Earnings']=df['Gross_Earnings']+s
print(df[['Employee_Name','Bonus','Gross_Earnings','Net_Pay']])
elif(a==9):
df=pd.DataFrame(payroll,index=[1,2,3,4,5,6,7,8,9,10])
s=float(input('Amount:'))
d=int(input('Choose the Employee (1-
10):\n1.XX\n2.YY\n3.ZZ\n4.AA\n5.GG\n6.HH\n7.TT\n8.JJ\n9.LL\n10.SS'))
if(d==1):
df['Spot_Bonus']=[s,0,0,0,0,0,0,0,0,0]
df['Gross_Earnings']=df['Gross_Earnings']+df['Spot_Bonus']
df['Net_Pay']=df['Net_Pay']+df['Spot_Bonus']

print(df[['Employee_Name','Spot_Bonus','Gross_Earnings','Net_Pay']])
if(d==2):
df['Spot_Bonus']=[0,s,0,0,0,0,0,0.0,0]
df['Gross_Earnings']=df['Gross_Earnings']+df['Spot_Bonus']
df['Net Pay']=df['Net_Pay']+df['Spot Bonus']
print(df[['Employee Name','Spot_Bonus','Gross Earnings',
'Net_Pay']])
if(d==3):
df['Spot_Bonus']=[0,0,s,0,0,0,0,0,0,0]
df['Gross_Earnings']=df['Gross_Earnings']+df['Spot Bonus']
df['Net Pay']=df['Net Pay']+df['Spot_Bonus']
print(df[['Employee_Name','Spot
Bonus','Gross_Earnings','Net_Pay']])
if(d==4):
df['Spot_Bonus']=[0,0,0,s,0,0,0,0,0,0]
df['Gross_Earnings']=df['Gross_Earnings']+df['Spot_Bonus']
df['Net_Pay']=df['Net Pay']+df['Spot_Bonus']

21
print(df[['Employee_Name','Spot_Bonus','Gross_Earnings','Net_Pay']])
if(d==5):
df['Spot_Bonus']=[0,0,0,0,s,0,0,0,0,0]
df['Gross_Earnings']=df['Gross_Earnings']+df['Spot_Bonus']
df['Net Pay']=df['Net_Pay']+df['Spot_Bonus']

print(df[['Employee_Name','Spot_Bonus','Gross_Earnings','Net_Pay']])
if(d==6):
df['Spot_Bonus']=[0,0,0,0,0,s,0,0,0,0]
df['Gross_Earnings']=df['Gross_Earnings']+df['Spot_Bonus']
df['Net_Pay']=df['Net_Pay']+df['Spot_Bonus']
print(df[['Employee Name','Spot
Bonus','Gross_Earnings','Net_Pay']])
if(d==7):
df['Spot_Bonus']=[0,0,0,0,0,0,s,0,0,0]
df['Gross_Earnings']=df['Gross_Earnings']+df['Spot_Bonus']
df['Net_Pay']=df['Net_Pay']+df['Spot_Bonus']
print(df[['Employee_Name','Spot_Bonus','Gross_Earnings',' Net
Pay']])
if(d==8):
df['Spot_Bonus']=[0,0,0,0,0,0,0,s,0,0]
df['Gross_Earnings']=df['Gross_Earnings']+df['Spot_Bonus']
df['Net_Pay']=df['Net_Pay']+df['Spot_Bonus']
print(df[['Employee_Name','Spot_Bonus','Gross_Earnings',' Net
Pay']])
if(d==9):
df['Spot_Bonus']=[0,0,0,0,0,0,0,0,s,0]
df['Gross_Earnings']=df['Gross_Earnings']+df['Spot_Bonus']
df['Net_Pay']=df['Net_Pay']+df['Spot_Bonus']
print(df[['Employee_Name','Spot_Bonus','Gross_Earnings',' Net
Pay']])
if(d==10):
df['Spot_Bonus']=[0,0,0,0,0,0,0,0,0,s]
df['Gross_Earnings']=df['Gross_Earnings']+df['Spot_Bonus']
df['Net_Pay']=df['Net_Pay']+df['Spot_Bonus']
print(df[['Employee_Name','Spot_Bonus','Gross_Earnings',' Net
Pay']])
if(d>10):
print('Check the number and run the program again!!')

22
if(d<1):
print('Check the number and run the program again!!')
else:
exit()
elif(a==10):
df=pd.DataFrame(payroll,index=[1,2,3,4,5,6,7.8,9,10])
s=int(input('Choose the Employee (1-
10):\n1.XX\n2.YY\n3.ZZ\n4.AA\n5.GG\n6.HH\n7.TT\n8.JJ\n9.LL\n10.SS'))
if(s==1):
print(df.loc[1,:])
if(s==2):
print(df.loc[2,:])
if(s==3):
print(df.loc[3,:])
if(s==4):
print(df.loc[4,:])
if(s==5):
print(df.loc[5,:])
if(s==6):
print(df.loc[6,:])
if(s==7):
print(df.loc[7,:])
if(s==8):
print(df.loc[8,:])
if(s==9):
print(df.loc[8,:])
if(s==10):
print(df.loc[10,:])
if(s>10):
print('Check the number and run the program again!!')
if(s<1):
print('Check the number and run the program again!!')
else:
exit()
elif(a==10):
df=pd.DataFrame(payroll,index=[1,2,3,4,5,6,7,8,9,10])
s=int(input('Choose the Employee (1-
10):\n1.XX\n2.YY\n3.ZZ\n4.AA\n5.GG\n6.HH\n7.TT\n8.JJ\n9.LL\n10.SS'))
if(s==1):
d=df.drop(1)

23
f=d.rename(index={2:1,3:2,4:3,5:4,6:5,7:6,8:7,9:8,10:9})
print(f)
if(s==2):
d=df.drop(2)
f=d.rename(index={3:2,4:3,5:4,6:5,7:6,8:7,9:8,10:9})
print(f)
if(s==3):
d=df.drop(3)
f=d.rename(index={4:3,5:4,6:5,7:6,8:7,9:8,10:9})
print(f)
if(s==4):
d=df.drop(4)
f=d.rename(index={5:4,6:5,7:6,8:7,9:8,10:9})
print(f)
if(s==5):
d=df.drop(5)
f=d.rename(index={6:5,7:6,8:7,9:8,10:9})
print(f)
if(s==6):
d=df.drop(6)
f=d.rename(index={7:6,8:7,9:8,10:9})
print(f)
if(s==7):
d=df.drop(7)
f=d.rename(index={8:7,9:8,10:9})
print(f)
if(s==8):
d=df.drop(8)
f=d.rename(index={9:8,10:9})
print(f)
if(s==9):
d=df.drop(9)
f=d.rename(index={10:9})
print(f)
if(s==10):
d=df.drop(10)
print(d)
if(s>10):
print('Check the number and run the program again!!')
if(s<1):

24
print('Check the number and run the program again!!')
else:
exit()
elif(a==12):
df=pd.DataFrame(payroll,index=[1,2,3,4,5,6,7,8,9,10])
s=int(input('Enter thr grade(3-7)'))
if(s==3):
d=df['Grade']==3
f=pd.DataFrame(df.where(d))
print(f.dropna(axis=0))
if(s==4):
d=df['Grade']==4
f=pd.DataFrame(df.where(d))
print(f.dropna(axis=0))
if(s==5):
d=df['Grade']==5
f=pd.DataFrame(df.where(d))
print(f.dropna(axis=0))
if(s==6):
d=df['Grade']==6
f=pd.DataFrame(df.where(d))
print(f.dropna(axis=0))
if(s==7):
d=df['Grade']==7
f=pd.DataFrame(df.where(d))
print(f.dropna(axis=0))
if(s>7):
print('Check the number and run the program again!!')
if(s<3):
print('Check the number and run the program again!!')
else:
exit()
elif(a==13):
df=pd.DataFrame(payroll,index=[1,2,3,4,5,6,7,8,9,10])
p=df['Basic_Salary'].max(axis=0)
d=df['Basic_Salary']==p
f=pd.Dataframe(df.where(d))
print(f.dropna(axis=0))
elif(a==14):
df=df=pd.DataFrame(payroll,index=[1,2,3,4,5,6,7,8,9,10])

25
p=df['Basic_Salary'].min(axis=0)
d=df['Basic_Salary']==p
f=pd.Dataframe(df.where(d))
print(f.dropna(axis=0))
elif(a==15):
df=pd.DataFrame(payroll,index=[1,2,3,4,5,6,7,8,9,10])
x=df["Grade"]
y=df['Basic_salary']*12
plt.bar(x,y,color=['red','orange','brown','gold','magenta','green'])
plt.ylabel('grade')
plt.ylabel('Employee Salary per Annum')
plt.title('Visualising company\nGrade system')
plt.show()
continue
else:
exit()
else:
exit()
#########################################

26
OUTPUT SCREEN:

MENUS PROVIDED:

OUTPUTS:

27
28
29
30
31
32
33
34
DATA VISUALIZATION
(option 15)

35
CSV - BACKENDTABLE:

36
CONCLUSION

In conclusion, the payroll project developed in


Python using Matplotlib and Pandas has
successfully addressed the essential aspects of
managing and visualizing payroll data. The
combination of Pandas facilitated efficient data
manipulation and analysis, while Matplotlib
enhanced the project by creating clear and
insightful visualizations.

37
BIBLIOGRAPHY

For completing this project, I have taken the help of the


following websites:-

➢ www.google.com
➢ www.niser.ac.in
➢ www.academia.edu
➢ Geeksforgeeks.org
➢ W3schools.com
➢ www.youtube.com
➢ Ncert book:- Informatics Practices

38

You might also like