IP project file 2
IP project file 2
PROJECT REPORT
INFORMATION PRACTICES
CLASS XII-A
2024-25
NAME- PRANJAY VARSHNEY
ROLL NO- 32
CERTIFICATE
School Seal:
ACKNOWLEDGEMENT
I would like to express my special thanks of gratitude
To my teacher Mr HARSHVARDHAN THAKUR who gave
me the golden opportunity to do this wonderful project
on the topic EMPLOYEES MANAGEMENT which
also helped me in doing a lot of research and I came to
know about so many new things.
Secondly I would also like to thank my parents and
friends who helped me a lot in finishing this project
within the time limit.
I am making this project not only for marks but to also
increase my knowledge.
INDEX
➢ INTRODUCTION
➢ HARDWARE & SOFTWARE REQUIREMENT
➢ CSV DATA FILE
➢ SOURCE CODE
➢ OUTPUT SCREEN
CSV FILE
EMPLOYEE.CSV
EMPNO NAME GENDER BASIC DA HRA CCA PF TOTAL NET
1 JOHN M 5000 2500 1500 500 600 10100 9500
Source
Code
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from tabulate import tabulate
while True:
username=input("Enter User Name : ")
password=input("\nEnter Password : ")
if username == "deepak" and password== "sharma":
print("\nWelcome to EMPLOYEES MANAGEMENT SYSTEM\n")
break
else:
print("Invalid Username or Password")
while True:
print('\t\t *** Employees Data Analysis Project *** ')
print('\n\t\t\t1. Data Analysis')
print('\n\t\t\t2. Data Visualization')
print('\n\t\t\t3. Data Operations')
print('\n\t\t\t4. Exit\n')
choice=int(input('Select your Choice [1-4] : '))
if choice==1:
while True:
print('\t*** EMPLOYEES MANAGEMENT SYSTEM ***\n')
print('*'*50)
print("\n\t\t1. Show Employees Data")
print("\n\t\t2. Show Data Name-Wise")
print('\n\t\t3. Show first nth records')
print("\n\t\t4. Show last nth records")
print("\n\t\t5. Display employee with highest Salary")
print('\n\t\t6. Display employee with lowest Salary')
print(tabulate(df,showindex=False,headers=['EMPNO','NAME','GENDER','BASIC','DA','
HRA','CCA','PF','TOTAL','NET'],tablefmt='pretty'))
elif choice == 2:
print("\nEmployees Data Name - Wise :\n\n")
df=pd.read_csv('D:\\Deepak\\2023-24\\XII IP\\Projects
IP\\aastha_employees.csv',usecols =
['NAME','GENDER','BASIC','DA','HRA','CCA','PF','TOTAL','NET'])
df = df.sort_values(by='NAME')
print(tabulate(df,showindex=False,headers=['NAME','GENDER','BASIC','DA','HRA','CC
A','PF','TOTAL','NET'],tablefmt='pretty'))
elif choice == 3:
print("\nFirst N Rows \n\n")
df=pd.read_csv('D:\\Deepak\\2023-24\\XII IP\\Projects
IP\\aastha_employees.csv')
df = df.sort_values(by='EMPNO')
nth = int(input("How many rows to display? : "))
print(tabulate(df.head(nth),showindex=False,headers=['EMPNO','NAME','GENDER','BAS
IC','DA','HRA','CCA','PF','TOTAL','NET'],tablefmt='pretty'))
elif choice == 4:
print("\nLast N Rows \n\n")
df=pd.read_csv('D:\\Deepak\\2023-24\\XII IP\\Projects
IP\\aastha_employees.csv')
df = df.sort_values(by='EMPNO')
nth = int(input("How many rows to display? : "))
print(tabulate(df.tail(nth),showindex=False,headers=['EMPNO','NAME','GENDER','BASI
C','DA','HRA','CCA','PF','TOTAL','NET'],tablefmt='pretty'))
elif choice == 5:
print("\nDisplay employee with highest Salary :\n\n")
df=pd.read_csv('D:\\Deepak\\2023-24\\XII IP\\Projects
IP\\aastha_employees.csv')
df = df.sort_values(by='NET')
print(tabulate(df.tail(1),showindex=False,headers=['EMPNO','NAME','GENDER','BASIC',
'DA','HRA','CCA','PF','TOTAL','NET'],tablefmt='pretty'))
elif choice==6:
print("\nDisplay employee with highest Salary :\n\n")
df=pd.read_csv('D:\\Deepak\\2023-24\\XII IP\\Projects
IP\\aastha_employees.csv')
df = df.sort_values(by='NET')
print(tabulate(df.head(1),showindex=False,headers=['EMPNO','NAME','GENDER','BASI
C','DA','HRA','CCA','PF','TOTAL','NET'],tablefmt='pretty'))
elif choice==7:
print('Exit to main menu............')
break
else:
print('Invalid Choice, Retry 1/2/3/4/5/6/7')
elif choice==2:
while True:
print('Data Visualization')
if choic==1:
print('Line Chart')
df=pd.read_csv('D:\\Deepak\\2023-24\\XII IP\\Projects
IP\\aastha_employees.csv')
df['NAME'] =
['JOHN','MOHAN','SOHAN','RADHA','GEETA','SIMRAN','PRIYA','SIMMI','PREM','AS
HWIN']
NAME=df["NAME"]
BASIC=df["BASIC"]
plt.ylabel("Basic Salary ----------->")
plt.xlabel("Name -------->")
plt.title("*** Name and Basic Salary ***")
plt.plot(NAME,BASIC, color='r')
plt.grid()
plt.savefig('emp_line.pdf')
plt.show()
elif choic==2:
print('Bar Chart')
df=pd.read_csv('D:\\Deepak\\2023-24\\XII IP\\Projects
IP\\aastha_employees.csv')
df['NAME'] =
['JOHN','MOHAN','SOHAN','RADHA','GEETA','SIMRAN','PRIYA','SIMMI','PREM','AS
HWIN']
NAME=df["NAME"]
BASIC=df["BASIC"]
plt.ylabel("BASIC")
plt.title("*** Name and Basic Salary ***")
plt.bar(NAME,BASIC, color='r')
plt.grid()
plt.savefig('emp_bar.pdf')
plt.show()
elif choic==3:
print('Bar Chart')
df=pd.read_csv('D:\\Deepak\\2023-24\\XII IP\\Projects
IP\\aastha_employees.csv')
df['NAME'] =
['JOHN','MOHAN','SOHAN','RADHA','GEETA','SIMRAN','PRIYA','SIMMI','PREM','AS
HWIN']
NAME=df["NAME"]
BASIC=df["BASIC"]
plt.xlabel("Basic Salary")
plt.title("Name and Basic Salary")
plt.barh(NAME,BASIC, color='r')
plt.grid()
plt.savefig('emp_barh.pdf')
plt.show()
elif choic==4:
print('Histogram')
df=pd.read_csv('D:\\Deepak\\2023-24\\XII IP\\Projects
IP\\aastha_employees.csv')
df['NAME'] = ['JOHN', 'MOHAN','SOHAN','RADHA','GEETA',
'SIMRAN','PRIYA','SIMMI','PREM','ASHWIN']
NAME=df["NAME"]
BASIC=df["BASIC"]
plt.title("Name and Basic Salary")
plt.hist(BASIC, color='r')
plt.grid()
plt.savefig('emp_hist.pdf')
plt.show()
elif choic==5:
print('Exit to main menu........')
break
else:
print('Invalid choice')
elif choice==3:
while True:
print('Data Operations')
print('\n\t1. Add a row to Dataframe')
print('\n\t2. Remove a row to Dataframe')
print('\n\t3. Add a Column to Dataframe')
print('\n\t4. Remove a Column to Dataframe')
print('\n\t5. Exit\n')
choic=int(input('Select your Choice [1-5] : '))
if choic==1:
df=pd.read_csv('D:\\Deepak\\2023-24\\XII IP\\Projects
IP\\aastha_employees.csv')
elif choic==2:
df=pd.read_csv('D:\\Deepak\\2023-24\\XII IP\\Projects
IP\\aastha_employees.csv')
print(tabulate(df,showindex=False,headers=['EMPNO','NAME','GENDER','BASIC','DA','
HRA','CCA','PF','TOTAL','NET'],tablefmt='pretty'))
r=int(input("Enter the Employee Number to be removed : "))
df= df.drop(r-1)
print(tabulate(df,showindex=False,headers=['EMPNO','NAME','GENDER','BASIC','DA','
HRA','CCA','PF','TOTAL','NET'],tablefmt='pretty'))
print('Invalid choice')
OUTPUT
SCREENS
Data Visualization
1. Plot Line Chart (Name and Basic Salary)
2. Plot Bar Chart Vertical (Name and Basic Salary)
3. Plot Bar Horizontal Chart (Name and Basic Salary)
4. Plot Histogram (Basic Salary)
5. Exit
Select your Choice [1-4] : 1
Line Chart
Data Visualization
1. Plot Line Chart (Name and Basic Salary)
2. Plot Bar Chart Vertical(Name and Basic Salary)
3. Plot Bar Horizontal Chart (Name and Basic Salary)
4. Plot Histogram (Basic Salary)
5. Exit
Select your Choice [1-4] : 2
Bar Chart
Data Visualization
1. Plot Line Chart (Name and Basic Salary)
2. Plot Bar Chart Vertical(Name and Basic Salary)
3. Plot Bar Horizontal Chart (Name and Basic Salary)
4. Plot Histogram (Basic Salary)
5. Exit
Select your Choice [1-4] : 3
Bar Chart
Data Visualization
1. Plot Line Chart (Name and Basic Salary)
2. Plot Bar Chart Vertical (Name and Basic Salary)
3. Plot Bar Horizontal Chart (Name and Basic Salary)
4. Plot Histogram (Basic Salary)
5. Exit
Select your Choice [1-4]: 4
Histogram
Data Operations
1. Add a row to Dataframe
2. Remove a row to Dataframe
3. Add a Column to Dataframe
4. Remove a Column to Dataframe
5. Exit
Select your Choice [1-5] : 2
Add a Column
Add Column DEPARTMENT :
+---+-------+--------+--------+-------+------+------+-----+-----+-------+-------+------------+
EMPNO NAME GENDER BASIC DA HRA | CCA | PF | TOTAL | NET | DEPARTMENT |
+---+-------+--------+--------+-------+------+------+-----+-----+-------+-------+------------+
| 0 | 1 | JOHN | M | 5000 | 2500 | 1500 | 500 | 600 | 10100 | 9500 | HR |
| 1 | 2 | MOHAN | M | 3000 | 1500 | 900 | 300 | 360 | 6060 | 5700 | SALES |
| 2 | 3 | SOHAN | M | 2000 | 1000 | 600 | 200 | 240 | 4040 | 3800 | FINANCE |
| 3 | 4 | RADHA | F | 5000 | 2500 | 1500 | 500 | 600 | 10100 | 9500 | HR |
| 4 | 5 | GEETA | F | 6000 | 3000 | 1800 | 600 | 720 | 12120 | 11400 | SALES |
| 5 | 6 | SIMRAN | F | 2500 | 1250 | 750 | 250 | 300 | 5050 | 4750 | FINANCE |
| 6 | 7 | PRIYA | F | 3500 | 1750 | 1050 | 350 | 420 | 7070 | 6650 | HR |
| 7 | 8 | SIMMI | F | 8000 | 4000 | 2400 | 800 | 960 | 16160 | 15200 | SALES |
| 8 | 9 | PREM | M | 5000 | 2500 | 1500 | 500 | 600 | 10100 | 9500 | FINANCE |
| 9 | 10 | ASHWIN | M | 6000 | 3000 | 1800 | 600 | 720 | 12120 | 11400 | SALES |
+---+-------+--------+--------+-------+------+------+-----+-----+-------+-------+------------+
Column added Successfully..............
Data Operations
1. Add a row to Dataframe
2. Remove a row to Dataframe
3. Add a Column to Dataframe
4. Remove a Column to Dataframe
5. Exit
Select your Choice [1-5] : 4
Remove a Column
Enter the Column Name to remove : GENDER
+---+----+--------+------+------+------+-----+-----+-------+-------+
| 0 | 1 | JOHN | 5000 | 2500 | 1500 | 500 | 600 | 10100 | 9500 |
| 1 | 2 | MOHAN | 3000 | 1500 | 900 | 300 | 360 | 6060 | 5700 |
BIBLIOGRAPHY
We took the information for our project report from the following
sources:
Reference books:
1. Informatics Practices by Sumita Arora.
2. Complete reference with Python
3. Data Analysis-Python
4. NCERT Text Book
Websites:
• https://www.python.org.in
• https://www.google.com
• https://www.cbseacademic.nic.in
• https://www.Kaggle.com