Professional Documents
Culture Documents
IP PROJECT Old
IP PROJECT Old
Code
import pandas as pd
import matplotlib.pyplot as plt
employee_data =
pd.DataFrame(columns=['EmployeeID',
'Name','Gender', 'Age', ' Basic Salary',
'Department'])
print("\nWelcome to EMPLOYEES MANAGEMENT
SYSTEM\n")
while True:
print("\nEmployee Management System
Menu:")
print("1. Add Employee")
print("2. Display Employee Data")
print("3. Plot Basic Salary Bar Chart")
print("4. Search Employee")
print("5. Update Employee Information")
print("6. Input your data and Save that Data to
File")
print("7. Count no. of employees in each
department")
print("8. Calculate and display Gross and Final
Salary")
print("9. Calculate Bonus of Employees")
print("10. Plot Gross and Final Salary Bar Chart")
print("11. Exit")
new_employee =
pd.DataFrame([[employee_id, name, gender, age,
salary, department]],
columns=['EmployeeID', 'Name','Gender',
'Age', 'Basic Salary', 'Department'])
employee_data = pd.concat([employee_data,
new_employee], ignore_index=True)
print("Employee added successfully!")
employee_data.to_csv("E:\IIT JEE\IP
project\Employee Management
System\emp2.csv", index=False)
result =
employee_data[employee_data[search_column]
== employee_id]
if not result.empty:
print("Employee Found:", result)
else:
print("Data not found in the specified
column.")
elif choice == '5':
employee_data = pd.read_csv("E:\IIT JEE\IP
project\Employee Management
System\emp2.csv")
to_update_value = int(input("Enter value to
update: "))
column_to_update = input("Enter the field to
update (Name/Salary/Department): ")
new_value = int(input("Enter the new value
for: "))
employee_data.loc[to_update_value,
column_to_update] = new_value
print(employee_data)
else:
print("Invalid choice. Please enter a number
between 1 and 8.")
OUTPUT
SCREENS