-
Notifications
You must be signed in to change notification settings - Fork 0
/
transformData.py
21 lines (15 loc) · 1.03 KB
/
transformData.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import pandas as pd
companies = ["sportGmbH", "bankZweiAG"]
for company in companies:
employees = pd.read_excel('data/' + company + '/' + company + '.xlsx', index_col='Personalnummer', sheet_name='AN_Infos')
tasks = pd.read_excel('data/' + company + '/' + company + '.xlsx', index_col='Tätigkeit', sheet_name='Tätigkeit')
employee_input = pd.read_excel('data/' + company + '/' + company + '.xlsx', index_col="Personalnummer", sheet_name='AN_Angaben')
tasks.columns = [col[0:3] for col in tasks.columns]
tasks = tasks.rename(columns={'IT ': 'it'})
employee_input = employee_input.rename(columns={'Homeoffice erwünscht?':'ho_wunsch', 'Gewünschte Anzahl Tage pro Woche im Homeoffice':'wunsch_tage'})
print(employees.columns)
print(tasks.columns)
print(employee_input.columns)
employees.to_csv('./data/' + company + '/employees_' + company + '.csv')
tasks.to_csv('./data/' + company + '/tasks_' + company + '.csv')
employee_input.to_csv('./data/' + company + '/employee_input_' + company + '.csv')