In this project we will be working as a data analyis and answer our stakeholders following questions.
# Import modules
import pandas as pd
import numpy as np
import matplotlib as plt
%matplotlib inline
# Import data
dete_survey = pd.read_csv('dete_survey.csv', na_values = 'Not Stated')
tafe_survey = pd.read_csv('tafe_survey.csv')
dete_survey.info()
<class 'pandas.core.frame.DataFrame'> RangeIndex: 822 entries, 0 to 821 Data columns (total 56 columns): ID 822 non-null int64 SeparationType 822 non-null object Cease Date 788 non-null object DETE Start Date 749 non-null float64 Role Start Date 724 non-null float64 Position 817 non-null object Classification 455 non-null object Region 717 non-null object Business Unit 126 non-null object Employment Status 817 non-null object Career move to public sector 822 non-null bool Career move to private sector 822 non-null bool Interpersonal conflicts 822 non-null bool Job dissatisfaction 822 non-null bool Dissatisfaction with the department 822 non-null bool Physical work environment 822 non-null bool Lack of recognition 822 non-null bool Lack of job security 822 non-null bool Work location 822 non-null bool Employment conditions 822 non-null bool Maternity/family 822 non-null bool Relocation 822 non-null bool Study/Travel 822 non-null bool Ill Health 822 non-null bool Traumatic incident 822 non-null bool Work life balance 822 non-null bool Workload 822 non-null bool None of the above 822 non-null bool Professional Development 808 non-null object Opportunities for promotion 735 non-null object Staff morale 816 non-null object Workplace issue 788 non-null object Physical environment 817 non-null object Worklife balance 815 non-null object Stress and pressure support 810 non-null object Performance of supervisor 813 non-null object Peer support 812 non-null object Initiative 813 non-null object Skills 811 non-null object Coach 767 non-null object Career Aspirations 746 non-null object Feedback 792 non-null object Further PD 768 non-null object Communication 814 non-null object My say 812 non-null object Information 816 non-null object Kept informed 813 non-null object Wellness programs 766 non-null object Health & Safety 793 non-null object Gender 798 non-null object Age 811 non-null object Aboriginal 16 non-null object Torres Strait 3 non-null object South Sea 7 non-null object Disability 23 non-null object NESB 32 non-null object dtypes: bool(18), float64(2), int64(1), object(35) memory usage: 258.6+ KB
dete_survey.head(10)
ID | SeparationType | Cease Date | DETE Start Date | Role Start Date | Position | Classification | Region | Business Unit | Employment Status | ... | Kept informed | Wellness programs | Health & Safety | Gender | Age | Aboriginal | Torres Strait | South Sea | Disability | NESB | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 1 | Ill Health Retirement | 08/2012 | 1984.0 | 2004.0 | Public Servant | A01-A04 | Central Office | Corporate Strategy and Peformance | Permanent Full-time | ... | N | N | N | Male | 56-60 | NaN | NaN | NaN | NaN | Yes |
1 | 2 | Voluntary Early Retirement (VER) | 08/2012 | NaN | NaN | Public Servant | AO5-AO7 | Central Office | Corporate Strategy and Peformance | Permanent Full-time | ... | N | N | N | Male | 56-60 | NaN | NaN | NaN | NaN | NaN |
2 | 3 | Voluntary Early Retirement (VER) | 05/2012 | 2011.0 | 2011.0 | Schools Officer | NaN | Central Office | Education Queensland | Permanent Full-time | ... | N | N | N | Male | 61 or older | NaN | NaN | NaN | NaN | NaN |
3 | 4 | Resignation-Other reasons | 05/2012 | 2005.0 | 2006.0 | Teacher | Primary | Central Queensland | NaN | Permanent Full-time | ... | A | N | A | Female | 36-40 | NaN | NaN | NaN | NaN | NaN |
4 | 5 | Age Retirement | 05/2012 | 1970.0 | 1989.0 | Head of Curriculum/Head of Special Education | NaN | South East | NaN | Permanent Full-time | ... | N | A | M | Female | 61 or older | NaN | NaN | NaN | NaN | NaN |
5 | 6 | Resignation-Other reasons | 05/2012 | 1994.0 | 1997.0 | Guidance Officer | NaN | Central Office | Education Queensland | Permanent Full-time | ... | D | D | NaN | Female | 41-45 | NaN | NaN | NaN | NaN | NaN |
6 | 7 | Age Retirement | 05/2012 | 1972.0 | 2007.0 | Teacher | Secondary | Darling Downs South West | NaN | Permanent Part-time | ... | D | D | SD | Female | 56-60 | NaN | NaN | NaN | NaN | NaN |
7 | 8 | Age Retirement | 05/2012 | 1988.0 | 1990.0 | Teacher Aide | NaN | North Coast | NaN | Permanent Part-time | ... | SA | NaN | SA | Female | 61 or older | NaN | NaN | NaN | NaN | NaN |
8 | 9 | Resignation-Other reasons | 07/2012 | 2009.0 | 2009.0 | Teacher | Secondary | North Queensland | NaN | Permanent Full-time | ... | A | D | N | Female | 31-35 | NaN | NaN | NaN | NaN | NaN |
9 | 10 | Resignation-Other employer | 2012 | 1997.0 | 2008.0 | Teacher Aide | NaN | NaN | NaN | Permanent Part-time | ... | SD | SD | SD | Female | 46-50 | NaN | NaN | NaN | NaN | NaN |
10 rows × 56 columns
dete_survey.isnull().sum()
ID 0 SeparationType 0 Cease Date 34 DETE Start Date 73 Role Start Date 98 Position 5 Classification 367 Region 105 Business Unit 696 Employment Status 5 Career move to public sector 0 Career move to private sector 0 Interpersonal conflicts 0 Job dissatisfaction 0 Dissatisfaction with the department 0 Physical work environment 0 Lack of recognition 0 Lack of job security 0 Work location 0 Employment conditions 0 Maternity/family 0 Relocation 0 Study/Travel 0 Ill Health 0 Traumatic incident 0 Work life balance 0 Workload 0 None of the above 0 Professional Development 14 Opportunities for promotion 87 Staff morale 6 Workplace issue 34 Physical environment 5 Worklife balance 7 Stress and pressure support 12 Performance of supervisor 9 Peer support 10 Initiative 9 Skills 11 Coach 55 Career Aspirations 76 Feedback 30 Further PD 54 Communication 8 My say 10 Information 6 Kept informed 9 Wellness programs 56 Health & Safety 29 Gender 24 Age 11 Aboriginal 806 Torres Strait 819 South Sea 815 Disability 799 NESB 790 dtype: int64
tafe_survey.info()
<class 'pandas.core.frame.DataFrame'> RangeIndex: 702 entries, 0 to 701 Data columns (total 72 columns): Record ID 702 non-null float64 Institute 702 non-null object WorkArea 702 non-null object CESSATION YEAR 695 non-null float64 Reason for ceasing employment 701 non-null object Contributing Factors. Career Move - Public Sector 437 non-null object Contributing Factors. Career Move - Private Sector 437 non-null object Contributing Factors. Career Move - Self-employment 437 non-null object Contributing Factors. Ill Health 437 non-null object Contributing Factors. Maternity/Family 437 non-null object Contributing Factors. Dissatisfaction 437 non-null object Contributing Factors. Job Dissatisfaction 437 non-null object Contributing Factors. Interpersonal Conflict 437 non-null object Contributing Factors. Study 437 non-null object Contributing Factors. Travel 437 non-null object Contributing Factors. Other 437 non-null object Contributing Factors. NONE 437 non-null object Main Factor. Which of these was the main factor for leaving? 113 non-null object InstituteViews. Topic:1. I feel the senior leadership had a clear vision and direction 608 non-null object InstituteViews. Topic:2. I was given access to skills training to help me do my job better 613 non-null object InstituteViews. Topic:3. I was given adequate opportunities for personal development 610 non-null object InstituteViews. Topic:4. I was given adequate opportunities for promotion within %Institute]Q25LBL% 608 non-null object InstituteViews. Topic:5. I felt the salary for the job was right for the responsibilities I had 615 non-null object InstituteViews. Topic:6. The organisation recognised when staff did good work 607 non-null object InstituteViews. Topic:7. Management was generally supportive of me 614 non-null object InstituteViews. Topic:8. Management was generally supportive of my team 608 non-null object InstituteViews. Topic:9. I was kept informed of the changes in the organisation which would affect me 610 non-null object InstituteViews. Topic:10. Staff morale was positive within the Institute 602 non-null object InstituteViews. Topic:11. If I had a workplace issue it was dealt with quickly 601 non-null object InstituteViews. Topic:12. If I had a workplace issue it was dealt with efficiently 597 non-null object InstituteViews. Topic:13. If I had a workplace issue it was dealt with discreetly 601 non-null object WorkUnitViews. Topic:14. I was satisfied with the quality of the management and supervision within my work unit 609 non-null object WorkUnitViews. Topic:15. I worked well with my colleagues 605 non-null object WorkUnitViews. Topic:16. My job was challenging and interesting 607 non-null object WorkUnitViews. Topic:17. I was encouraged to use my initiative in the course of my work 610 non-null object WorkUnitViews. Topic:18. I had sufficient contact with other people in my job 613 non-null object WorkUnitViews. Topic:19. I was given adequate support and co-operation by my peers to enable me to do my job 609 non-null object WorkUnitViews. Topic:20. I was able to use the full range of my skills in my job 609 non-null object WorkUnitViews. Topic:21. I was able to use the full range of my abilities in my job. ; Category:Level of Agreement; Question:YOUR VIEWS ABOUT YOUR WORK UNIT] 608 non-null object WorkUnitViews. Topic:22. I was able to use the full range of my knowledge in my job 608 non-null object WorkUnitViews. Topic:23. My job provided sufficient variety 611 non-null object WorkUnitViews. Topic:24. I was able to cope with the level of stress and pressure in my job 610 non-null object WorkUnitViews. Topic:25. My job allowed me to balance the demands of work and family to my satisfaction 611 non-null object WorkUnitViews. Topic:26. My supervisor gave me adequate personal recognition and feedback on my performance 606 non-null object WorkUnitViews. Topic:27. My working environment was satisfactory e.g. sufficient space, good lighting, suitable seating and working area 610 non-null object WorkUnitViews. Topic:28. I was given the opportunity to mentor and coach others in order for me to pass on my skills and knowledge prior to my cessation date 609 non-null object WorkUnitViews. Topic:29. There was adequate communication between staff in my unit 603 non-null object WorkUnitViews. Topic:30. Staff morale was positive within my work unit 606 non-null object Induction. Did you undertake Workplace Induction? 619 non-null object InductionInfo. Topic:Did you undertake a Corporate Induction? 432 non-null object InductionInfo. Topic:Did you undertake a Institute Induction? 483 non-null object InductionInfo. Topic: Did you undertake Team Induction? 440 non-null object InductionInfo. Face to Face Topic:Did you undertake a Corporate Induction; Category:How it was conducted? 555 non-null object InductionInfo. On-line Topic:Did you undertake a Corporate Induction; Category:How it was conducted? 555 non-null object InductionInfo. Induction Manual Topic:Did you undertake a Corporate Induction? 555 non-null object InductionInfo. Face to Face Topic:Did you undertake a Institute Induction? 530 non-null object InductionInfo. On-line Topic:Did you undertake a Institute Induction? 555 non-null object InductionInfo. Induction Manual Topic:Did you undertake a Institute Induction? 553 non-null object InductionInfo. Face to Face Topic: Did you undertake Team Induction; Category? 555 non-null object InductionInfo. On-line Topic: Did you undertake Team Induction?process you undertook and how it was conducted.] 555 non-null object InductionInfo. Induction Manual Topic: Did you undertake Team Induction? 555 non-null object Workplace. Topic:Did you and your Manager develop a Performance and Professional Development Plan (PPDP)? 608 non-null object Workplace. Topic:Does your workplace promote a work culture free from all forms of unlawful discrimination? 594 non-null object Workplace. Topic:Does your workplace promote and practice the principles of employment equity? 587 non-null object Workplace. Topic:Does your workplace value the diversity of its employees? 586 non-null object Workplace. Topic:Would you recommend the Institute as an employer to others? 581 non-null object Gender. What is your Gender? 596 non-null object CurrentAge. Current Age 596 non-null object Employment Type. Employment Type 596 non-null object Classification. Classification 596 non-null object LengthofServiceOverall. Overall Length of Service at Institute (in years) 596 non-null object LengthofServiceCurrent. Length of Service at current workplace (in years) 596 non-null object dtypes: float64(2), object(70) memory usage: 395.0+ KB
tafe_survey.head()
Record ID | Institute | WorkArea | CESSATION YEAR | Reason for ceasing employment | Contributing Factors. Career Move - Public Sector | Contributing Factors. Career Move - Private Sector | Contributing Factors. Career Move - Self-employment | Contributing Factors. Ill Health | Contributing Factors. Maternity/Family | ... | Workplace. Topic:Does your workplace promote a work culture free from all forms of unlawful discrimination? | Workplace. Topic:Does your workplace promote and practice the principles of employment equity? | Workplace. Topic:Does your workplace value the diversity of its employees? | Workplace. Topic:Would you recommend the Institute as an employer to others? | Gender. What is your Gender? | CurrentAge. Current Age | Employment Type. Employment Type | Classification. Classification | LengthofServiceOverall. Overall Length of Service at Institute (in years) | LengthofServiceCurrent. Length of Service at current workplace (in years) | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 6.341330e+17 | Southern Queensland Institute of TAFE | Non-Delivery (corporate) | 2010.0 | Contract Expired | NaN | NaN | NaN | NaN | NaN | ... | Yes | Yes | Yes | Yes | Female | 26 30 | Temporary Full-time | Administration (AO) | 1-2 | 1-2 |
1 | 6.341337e+17 | Mount Isa Institute of TAFE | Non-Delivery (corporate) | 2010.0 | Retirement | - | - | - | - | - | ... | Yes | Yes | Yes | Yes | NaN | NaN | NaN | NaN | NaN | NaN |
2 | 6.341388e+17 | Mount Isa Institute of TAFE | Delivery (teaching) | 2010.0 | Retirement | - | - | - | - | - | ... | Yes | Yes | Yes | Yes | NaN | NaN | NaN | NaN | NaN | NaN |
3 | 6.341399e+17 | Mount Isa Institute of TAFE | Non-Delivery (corporate) | 2010.0 | Resignation | - | - | - | - | - | ... | Yes | Yes | Yes | Yes | NaN | NaN | NaN | NaN | NaN | NaN |
4 | 6.341466e+17 | Southern Queensland Institute of TAFE | Delivery (teaching) | 2010.0 | Resignation | - | Career Move - Private Sector | - | - | - | ... | Yes | Yes | Yes | Yes | Male | 41 45 | Permanent Full-time | Teacher (including LVT) | 3-4 | 3-4 |
5 rows × 72 columns
tafe_survey.isnull().sum()
Record ID 0 Institute 0 WorkArea 0 CESSATION YEAR 7 Reason for ceasing employment 1 Contributing Factors. Career Move - Public Sector 265 Contributing Factors. Career Move - Private Sector 265 Contributing Factors. Career Move - Self-employment 265 Contributing Factors. Ill Health 265 Contributing Factors. Maternity/Family 265 Contributing Factors. Dissatisfaction 265 Contributing Factors. Job Dissatisfaction 265 Contributing Factors. Interpersonal Conflict 265 Contributing Factors. Study 265 Contributing Factors. Travel 265 Contributing Factors. Other 265 Contributing Factors. NONE 265 Main Factor. Which of these was the main factor for leaving? 589 InstituteViews. Topic:1. I feel the senior leadership had a clear vision and direction 94 InstituteViews. Topic:2. I was given access to skills training to help me do my job better 89 InstituteViews. Topic:3. I was given adequate opportunities for personal development 92 InstituteViews. Topic:4. I was given adequate opportunities for promotion within %Institute]Q25LBL% 94 InstituteViews. Topic:5. I felt the salary for the job was right for the responsibilities I had 87 InstituteViews. Topic:6. The organisation recognised when staff did good work 95 InstituteViews. Topic:7. Management was generally supportive of me 88 InstituteViews. Topic:8. Management was generally supportive of my team 94 InstituteViews. Topic:9. I was kept informed of the changes in the organisation which would affect me 92 InstituteViews. Topic:10. Staff morale was positive within the Institute 100 InstituteViews. Topic:11. If I had a workplace issue it was dealt with quickly 101 InstituteViews. Topic:12. If I had a workplace issue it was dealt with efficiently 105 ... WorkUnitViews. Topic:25. My job allowed me to balance the demands of work and family to my satisfaction 91 WorkUnitViews. Topic:26. My supervisor gave me adequate personal recognition and feedback on my performance 96 WorkUnitViews. Topic:27. My working environment was satisfactory e.g. sufficient space, good lighting, suitable seating and working area 92 WorkUnitViews. Topic:28. I was given the opportunity to mentor and coach others in order for me to pass on my skills and knowledge prior to my cessation date 93 WorkUnitViews. Topic:29. There was adequate communication between staff in my unit 99 WorkUnitViews. Topic:30. Staff morale was positive within my work unit 96 Induction. Did you undertake Workplace Induction? 83 InductionInfo. Topic:Did you undertake a Corporate Induction? 270 InductionInfo. Topic:Did you undertake a Institute Induction? 219 InductionInfo. Topic: Did you undertake Team Induction? 262 InductionInfo. Face to Face Topic:Did you undertake a Corporate Induction; Category:How it was conducted? 147 InductionInfo. On-line Topic:Did you undertake a Corporate Induction; Category:How it was conducted? 147 InductionInfo. Induction Manual Topic:Did you undertake a Corporate Induction? 147 InductionInfo. Face to Face Topic:Did you undertake a Institute Induction? 172 InductionInfo. On-line Topic:Did you undertake a Institute Induction? 147 InductionInfo. Induction Manual Topic:Did you undertake a Institute Induction? 149 InductionInfo. Face to Face Topic: Did you undertake Team Induction; Category? 147 InductionInfo. On-line Topic: Did you undertake Team Induction?process you undertook and how it was conducted.] 147 InductionInfo. Induction Manual Topic: Did you undertake Team Induction? 147 Workplace. Topic:Did you and your Manager develop a Performance and Professional Development Plan (PPDP)? 94 Workplace. Topic:Does your workplace promote a work culture free from all forms of unlawful discrimination? 108 Workplace. Topic:Does your workplace promote and practice the principles of employment equity? 115 Workplace. Topic:Does your workplace value the diversity of its employees? 116 Workplace. Topic:Would you recommend the Institute as an employer to others? 121 Gender. What is your Gender? 106 CurrentAge. Current Age 106 Employment Type. Employment Type 106 Classification. Classification 106 LengthofServiceOverall. Overall Length of Service at Institute (in years) 106 LengthofServiceCurrent. Length of Service at current workplace (in years) 106 Length: 72, dtype: int64
First thoughts are that the dete_survey data has a few columns that are almost wholly null values and will likely be dropped. These relate primarily to geogragphy and are not needed for the questions being asked. Additionally, the fete_survey has a significant number of null values. As of yet I have retained them but several will be dropped in the subsiquent steps.
'Not Stated' was contained in the dete_survey, these have been converted to Nan values upon importing the data.
dete_survey_updated = dete_survey.drop(dete_survey.columns[28:49], axis=1)
#dete_survey_updated.head()
tafe_survey_updated = tafe_survey.drop(tafe_survey.columns[17:66], axis=1)
#tafe_survey_updated.head()
In the above steps we have removed columns 28-49 from the dete_survey and columns 17-66 from the tafe_survey because they are non-relevent to the analysis we are carying out.
Below we will work on cleaning the column names of the remaining columns. This is done in order to standardize the column names as well as remove the excessively long column names that are present.
dete_survey_updated.columns = dete_survey_updated.columns.str.strip().str.lower().str.replace('\s+','_')
dete_survey_updated.head(1)
id | separationtype | cease_date | dete_start_date | role_start_date | position | classification | region | business_unit | employment_status | ... | work_life_balance | workload | none_of_the_above | gender | age | aboriginal | torres_strait | south_sea | disability | nesb | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 1 | Ill Health Retirement | 08/2012 | 1984.0 | 2004.0 | Public Servant | A01-A04 | Central Office | Corporate Strategy and Peformance | Permanent Full-time | ... | False | False | True | Male | 56-60 | NaN | NaN | NaN | NaN | Yes |
1 rows × 35 columns
tafe_survey_updated.columns
Index(['Record ID', 'Institute', 'WorkArea', 'CESSATION YEAR', 'Reason for ceasing employment', 'Contributing Factors. Career Move - Public Sector ', 'Contributing Factors. Career Move - Private Sector ', 'Contributing Factors. Career Move - Self-employment', 'Contributing Factors. Ill Health', 'Contributing Factors. Maternity/Family', 'Contributing Factors. Dissatisfaction', 'Contributing Factors. Job Dissatisfaction', 'Contributing Factors. Interpersonal Conflict', 'Contributing Factors. Study', 'Contributing Factors. Travel', 'Contributing Factors. Other', 'Contributing Factors. NONE', 'Gender. What is your Gender?', 'CurrentAge. Current Age', 'Employment Type. Employment Type', 'Classification. Classification', 'LengthofServiceOverall. Overall Length of Service at Institute (in years)', 'LengthofServiceCurrent. Length of Service at current workplace (in years)'], dtype='object')
tafe_survey_updated = tafe_survey_updated.rename({'Record ID': 'id', 'CESSATION YEAR':'cease_date','Reason for ceasing employment': 'separationtype', 'Gender. What is your Gender?':'gender', 'CurrentAge. Current Age':'age', 'Employment Type. Employment Type':'employment_status','Classification. Classification': 'position','LengthofServiceOverall. Overall Length of Service at Institute (in years)': 'institute_service','LengthofServiceCurrent. Length of Service at current workplace (in years)': 'role_service'}, axis=1)
tafe_survey_updated.head(1)
id | Institute | WorkArea | cease_date | separationtype | Contributing Factors. Career Move - Public Sector | Contributing Factors. Career Move - Private Sector | Contributing Factors. Career Move - Self-employment | Contributing Factors. Ill Health | Contributing Factors. Maternity/Family | ... | Contributing Factors. Study | Contributing Factors. Travel | Contributing Factors. Other | Contributing Factors. NONE | gender | age | employment_status | position | institute_service | role_service | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 6.341330e+17 | Southern Queensland Institute of TAFE | Non-Delivery (corporate) | 2010.0 | Contract Expired | NaN | NaN | NaN | NaN | NaN | ... | NaN | NaN | NaN | NaN | Female | 26 30 | Temporary Full-time | Administration (AO) | 1-2 | 1-2 |
1 rows × 23 columns
# Value counts of the separation type. We are looking for those instances where
# the separation was a 'resignation'.
dete_survey_updated['separationtype'].value_counts()
Age Retirement 285 Resignation-Other reasons 150 Resignation-Other employer 91 Resignation-Move overseas/interstate 70 Voluntary Early Retirement (VER) 67 Ill Health Retirement 61 Other 49 Contract Expired 34 Termination 15 Name: separationtype, dtype: int64
# Value counts of the separation type. We are looking for those instances where
# the separation was a 'resignation'.
tafe_survey_updated['separationtype'].value_counts()
Resignation 340 Contract Expired 127 Retrenchment/ Redundancy 104 Retirement 82 Transfer 25 Termination 23 Name: separationtype, dtype: int64
# Extracting resignation data and making a copy
res = r"Resignation"
dete_resignations = dete_survey_updated[dete_survey_updated['separationtype'].str.contains(res, 'Other')]
dete_resignations = dete_resignations.copy()
# Extracting resignation data and making a copy
tafe_resignations = tafe_survey_updated[tafe_survey_updated['separationtype'] == 'Resignation']
tafe_resignations = tafe_resignations.copy()
In the above steps we selected just the data where the employees' separation was listed as either 'Resignation' or 'other'. Other was included as I would expect that if anyone was attempting to smooth over a rough departure they would list it as 'Other' rather than 'Resignation'.
Additionally, we made copies of the data to facilitate further maniputlation in later steps.
# Value counts of Cease date in order to view the date formats.
dete_resignations['cease_date'].value_counts()
2012 126 2013 74 01/2014 22 12/2013 17 06/2013 14 09/2013 11 07/2013 9 11/2013 9 10/2013 6 08/2013 4 05/2012 2 05/2013 2 2010 1 07/2012 1 09/2010 1 07/2006 1 Name: cease_date, dtype: int64
# In the below we will remove the month from the 'cease_date' and update the values accordingly.
dete_resignations['cease_date'] = dete_resignations['cease_date'].str.split('/').str.get(-1).astype(float)
dete_resignations['cease_date'].value_counts()
2013.0 146 2012.0 129 2014.0 22 2010.0 2 2006.0 1 Name: cease_date, dtype: int64
# In the below we will check the 'start_date' and 'dete_resignations' columns for incorrect data. We will
# also check for min and max to ensure that no dates are unrealistic.
dete_resignations['dete_start_date'].value_counts().sort_index(ascending=True)
1963.0 1 1971.0 1 1972.0 1 1973.0 1 1974.0 2 1975.0 1 1976.0 2 1977.0 1 1980.0 5 1982.0 1 1983.0 2 1984.0 1 1985.0 3 1986.0 3 1987.0 1 1988.0 4 1989.0 4 1990.0 5 1991.0 4 1992.0 6 1993.0 5 1994.0 6 1995.0 4 1996.0 6 1997.0 5 1998.0 6 1999.0 8 2000.0 9 2001.0 3 2002.0 6 2003.0 6 2004.0 14 2005.0 15 2006.0 13 2007.0 21 2008.0 22 2009.0 13 2010.0 17 2011.0 24 2012.0 21 2013.0 10 Name: dete_start_date, dtype: int64
# In the below we will look at the 'cease_date' in the tafe_resignations data.
tafe_resignations['cease_date'].value_counts().sort_index(ascending=True)
2009.0 2 2010.0 68 2011.0 116 2012.0 94 2013.0 55 Name: cease_date, dtype: int64
In the below cell we create a new column to show years of service by subtracting the start date from the cease date. Interestingly at first glance the years of service < 10 all have double digits where as > 10 do not, indicating that it is possible that people with lower tenures have a greater churn rate than those with longer tenures.
dete_resignations['institute_service'] = dete_resignations['cease_date'] - dete_resignations['dete_start_date']
dete_resignations['institute_service'].value_counts().sort_index(ascending=True)
0.0 20 1.0 22 2.0 14 3.0 20 4.0 16 5.0 23 6.0 17 7.0 13 8.0 8 9.0 14 10.0 6 11.0 4 12.0 6 13.0 8 14.0 6 15.0 7 16.0 5 17.0 6 18.0 5 19.0 3 20.0 7 21.0 3 22.0 6 23.0 4 24.0 4 25.0 2 26.0 2 27.0 1 28.0 2 29.0 1 30.0 2 31.0 1 32.0 3 33.0 1 34.0 1 35.0 1 36.0 2 38.0 1 39.0 3 41.0 1 42.0 1 49.0 1 Name: institute_service, dtype: int64
In the below steps we will extract the datapoints from the TAFE data that indicates dissatisfaction and assign these to a new column 'dissatisfied'.
# In this step we will be looking to pull out indicators that show dissatisfaction with the job.
tafe_resignations['Contributing Factors. Dissatisfaction'].value_counts()
- 277 Contributing Factors. Dissatisfaction 55 Name: Contributing Factors. Dissatisfaction, dtype: int64
# In this step we will be looking to pull out indicators that show dissatisfaction with the job.
tafe_resignations['Contributing Factors. Job Dissatisfaction'].value_counts()
- 270 Job Dissatisfaction 62 Name: Contributing Factors. Job Dissatisfaction, dtype: int64
# Below is a function to convert the values in the tafe_resignations 'dissatisfaction' columns to True, False or NaN values.
def update_vals(x):
if pd.isnull(x):
return np.nan
elif x == '-':
return False
else:
return True
# Below we will call the above function on the two columns
# We will then create a new column that will be True if either of the above were true in order to consolodate the dissatisfied remarks into one column.
tafe_resignations['dissatisfied'] = tafe_resignations[['Contributing Factors. Job Dissatisfaction','Contributing Factors. Dissatisfaction']].applymap(update_vals).any(axis=1, skipna=False)
tafe_resignations_up = tafe_resignations.copy()
tafe_resignations_up['dissatisfied'].value_counts()
False 241 True 91 Name: dissatisfied, dtype: int64
# Below we will create a new column on the dete_resignations data as well.
res_cols = ['job_dissatisfaction','dissatisfaction_with_the_department','physical_work_environment','lack_of_recognition','lack_of_job_security','work_location','employment_conditions','work_life_balance','workload']
dete_resignations['dissatisfied'] = dete_resignations[res_cols].any(axis=1, skipna=False)
dete_resignations_up = dete_resignations.copy()
dete_resignations_up.head()
dete_resignations_up['dissatisfied'].value_counts()
False 162 True 149 Name: dissatisfied, dtype: int64
In the above two cells we have the result of our consolidations of dissatisfied feedback. It is interesting that in the tafe_data slightly less than 1/3 (91 to 241) people were dissatisfied upon there resignation. In the dete_data it was more substantial with approximately 1/2 (149 to 162) people were dissatisfied upon their resignatoin.
I would have a few takaways at this point.
# Adding a column to lable each row as DETE
dete_resignations_up['institute'] = 'DETE'
dete_resignations_up
id | separationtype | cease_date | dete_start_date | role_start_date | position | classification | region | business_unit | employment_status | ... | gender | age | aboriginal | torres_strait | south_sea | disability | nesb | institute_service | dissatisfied | institute | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3 | 4 | Resignation-Other reasons | 2012.0 | 2005.0 | 2006.0 | Teacher | Primary | Central Queensland | NaN | Permanent Full-time | ... | Female | 36-40 | NaN | NaN | NaN | NaN | NaN | 7.0 | False | DETE |
5 | 6 | Resignation-Other reasons | 2012.0 | 1994.0 | 1997.0 | Guidance Officer | NaN | Central Office | Education Queensland | Permanent Full-time | ... | Female | 41-45 | NaN | NaN | NaN | NaN | NaN | 18.0 | True | DETE |
8 | 9 | Resignation-Other reasons | 2012.0 | 2009.0 | 2009.0 | Teacher | Secondary | North Queensland | NaN | Permanent Full-time | ... | Female | 31-35 | NaN | NaN | NaN | NaN | NaN | 3.0 | False | DETE |
9 | 10 | Resignation-Other employer | 2012.0 | 1997.0 | 2008.0 | Teacher Aide | NaN | NaN | NaN | Permanent Part-time | ... | Female | 46-50 | NaN | NaN | NaN | NaN | NaN | 15.0 | True | DETE |
11 | 12 | Resignation-Move overseas/interstate | 2012.0 | 2009.0 | 2009.0 | Teacher | Secondary | Far North Queensland | NaN | Permanent Full-time | ... | Male | 31-35 | NaN | NaN | NaN | NaN | NaN | 3.0 | False | DETE |
12 | 13 | Resignation-Other reasons | 2012.0 | 1998.0 | 1998.0 | Teacher | Primary | Far North Queensland | NaN | Permanent Full-time | ... | Female | 36-40 | NaN | NaN | NaN | NaN | NaN | 14.0 | False | DETE |
14 | 15 | Resignation-Other employer | 2012.0 | 2007.0 | 2010.0 | Teacher | Secondary | Central Queensland | NaN | Permanent Full-time | ... | Male | 31-35 | NaN | NaN | NaN | NaN | NaN | 5.0 | True | DETE |
16 | 17 | Resignation-Other reasons | 2012.0 | NaN | NaN | Teacher Aide | NaN | South East | NaN | Permanent Part-time | ... | Male | 61 or older | NaN | NaN | NaN | NaN | NaN | NaN | True | DETE |
20 | 21 | Resignation-Other employer | 2012.0 | 1982.0 | 1982.0 | Teacher | Secondary | Central Queensland | NaN | Permanent Full-time | ... | Male | 56-60 | NaN | NaN | NaN | NaN | NaN | 30.0 | False | DETE |
21 | 22 | Resignation-Other reasons | 2012.0 | 1980.0 | 2009.0 | Cleaner | NaN | Darling Downs South West | NaN | Permanent Part-time | ... | Female | 51-55 | NaN | NaN | NaN | NaN | NaN | 32.0 | False | DETE |
22 | 23 | Resignation-Other reasons | 2012.0 | 1997.0 | 1998.0 | School Administrative Staff | NaN | Metropolitan | NaN | Permanent Part-time | ... | Female | 46-50 | NaN | NaN | NaN | NaN | NaN | 15.0 | True | DETE |
23 | 24 | Resignation-Other reasons | 2012.0 | 1973.0 | 2012.0 | Teacher | Primary | North Queensland | NaN | Permanent Full-time | ... | Female | 61 or older | NaN | NaN | NaN | NaN | NaN | 39.0 | True | DETE |
25 | 26 | Resignation-Other reasons | 2012.0 | 1995.0 | 2002.0 | Teacher | Primary | South East | NaN | Permanent Part-time | ... | Female | 41-45 | NaN | NaN | NaN | NaN | NaN | 17.0 | True | DETE |
27 | 28 | Resignation-Other employer | 2012.0 | 2005.0 | 2011.0 | Public Servant | AO5-AO7 | Central Office | Information and Technologies | Permanent Full-time | ... | Female | 21-25 | Yes | NaN | NaN | NaN | NaN | 7.0 | False | DETE |
33 | 34 | Resignation-Other reasons | 2012.0 | 2003.0 | 2003.0 | Teacher | Secondary | NaN | NaN | Permanent Full-time | ... | Male | 36-40 | NaN | NaN | NaN | Yes | NaN | 9.0 | True | DETE |
34 | 35 | Resignation-Other reasons | 2012.0 | 2006.0 | 2009.0 | Cleaner | NaN | Central Office | Education Queensland | Permanent Part-time | ... | Male | 61 or older | NaN | NaN | NaN | NaN | NaN | 6.0 | True | DETE |
37 | 38 | Resignation-Other reasons | 2012.0 | 2011.0 | 2011.0 | Teacher Aide | NaN | Central Queensland | NaN | Temporary Part-time | ... | Female | 21-25 | NaN | NaN | NaN | NaN | NaN | 1.0 | False | DETE |
39 | 40 | Resignation-Move overseas/interstate | 2012.0 | NaN | NaN | Teacher | NaN | Central Queensland | NaN | Permanent Full-time | ... | Female | 21-25 | NaN | NaN | NaN | NaN | NaN | NaN | True | DETE |
40 | 41 | Resignation-Other employer | 2012.0 | 1977.0 | 1980.0 | Teacher | Primary | South East | NaN | Permanent Full-time | ... | Male | 56-60 | NaN | NaN | NaN | NaN | NaN | 35.0 | False | DETE |
41 | 42 | Resignation-Other reasons | 2012.0 | 1974.0 | 1994.0 | Head of Curriculum/Head of Special Education | NaN | Metropolitan | NaN | Permanent Full-time | ... | Female | 51-55 | NaN | NaN | NaN | NaN | NaN | 38.0 | True | DETE |
42 | 43 | Resignation-Move overseas/interstate | 2012.0 | 2011.0 | 2011.0 | Cleaner | NaN | North Coast | NaN | Permanent Part-time | ... | Female | 41-45 | NaN | NaN | NaN | NaN | NaN | 1.0 | False | DETE |
43 | 44 | Resignation-Other reasons | 2012.0 | 1976.0 | 1976.0 | Teacher | Primary | North Coast | NaN | Permanent Full-time | ... | Male | 51-55 | NaN | NaN | NaN | NaN | NaN | 36.0 | True | DETE |
48 | 49 | Resignation-Move overseas/interstate | 2012.0 | 2009.0 | 2010.0 | Cleaner | NaN | South East | NaN | Permanent Full-time | ... | Male | 21-25 | NaN | NaN | NaN | NaN | NaN | 3.0 | False | DETE |
50 | 51 | Resignation-Move overseas/interstate | 2012.0 | 2009.0 | 2010.0 | Cleaner | NaN | South East | NaN | Permanent Full-time | ... | Male | 21-25 | NaN | NaN | NaN | NaN | NaN | 3.0 | False | DETE |
51 | 52 | Resignation-Other reasons | 2012.0 | 1993.0 | 1993.0 | Cleaner | NaN | South East | NaN | Permanent Full-time | ... | Female | 61 or older | NaN | NaN | NaN | NaN | NaN | 19.0 | False | DETE |
55 | 56 | Resignation-Other employer | 2012.0 | 2008.0 | 2008.0 | Teacher Aide | NaN | Metropolitan | NaN | Permanent Part-time | ... | Female | 26-30 | NaN | NaN | NaN | NaN | NaN | 4.0 | False | DETE |
57 | 58 | Resignation-Other employer | 2012.0 | 2003.0 | 2012.0 | Teacher | Secondary | Darling Downs South West | NaN | Permanent Full-time | ... | Male | 46-50 | NaN | NaN | NaN | NaN | NaN | 9.0 | False | DETE |
61 | 62 | Resignation-Other reasons | 2012.0 | 2011.0 | 2011.0 | Schools Officer | NaN | Central Queensland | NaN | Temporary Part-time | ... | Female | 31-35 | NaN | NaN | NaN | NaN | NaN | 1.0 | False | DETE |
69 | 70 | Resignation-Other reasons | 2012.0 | 2006.0 | NaN | Public Servant | AO5-AO7 | Central Office | Information and Technologies | Permanent Full-time | ... | Female | 36-40 | NaN | NaN | NaN | NaN | NaN | 6.0 | True | DETE |
71 | 72 | Resignation-Other reasons | 2012.0 | 2011.0 | 2011.0 | Teacher Aide | NaN | Far North Queensland | NaN | Permanent Part-time | ... | Female | 36-40 | NaN | NaN | NaN | NaN | NaN | 1.0 | False | DETE |
... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
747 | 749 | Resignation-Move overseas/interstate | 2014.0 | 2008.0 | 2008.0 | Teacher | Primary | North Coast | NaN | Permanent Full-time | ... | Female | 41-45 | NaN | NaN | NaN | NaN | NaN | 6.0 | False | DETE |
751 | 753 | Resignation-Other reasons | 2013.0 | 2005.0 | 2005.0 | Cleaner | NaN | Central Office | Education Queensland | Permanent Part-time | ... | Male | 61 or older | NaN | NaN | NaN | NaN | NaN | 8.0 | True | DETE |
752 | 754 | Resignation-Other reasons | 2013.0 | 1998.0 | NaN | Teacher Aide | NaN | Darling Downs South West | NaN | Permanent Part-time | ... | Female | 46-50 | NaN | NaN | NaN | Yes | NaN | 15.0 | False | DETE |
753 | 755 | Resignation-Other employer | 2013.0 | 2004.0 | 2011.0 | Teacher | Primary | Central Queensland | NaN | Permanent Full-time | ... | Female | 31-35 | NaN | NaN | NaN | NaN | NaN | 9.0 | True | DETE |
755 | 757 | Resignation-Other employer | 2013.0 | 2012.0 | 2013.0 | Teacher | Primary | Central Queensland | NaN | Permanent Part-time | ... | Female | 41-45 | NaN | NaN | NaN | NaN | NaN | 1.0 | False | DETE |
762 | 764 | Resignation-Other employer | 2006.0 | 2006.0 | 2006.0 | Teacher | Primary | Metropolitan | NaN | Permanent Part-time | ... | Female | 41-45 | NaN | NaN | NaN | NaN | NaN | 0.0 | False | DETE |
766 | 768 | Resignation-Other employer | 2014.0 | 2007.0 | 2007.0 | Teacher | Primary | Metropolitan | NaN | Permanent Full-time | ... | Male | 26-30 | NaN | NaN | NaN | NaN | NaN | 7.0 | False | DETE |
769 | 771 | Resignation-Other reasons | 2013.0 | 2008.0 | NaN | Teacher Aide | NaN | South East | NaN | Permanent Full-time | ... | Female | 46-50 | NaN | NaN | NaN | NaN | NaN | 5.0 | False | DETE |
770 | 772 | Resignation-Other reasons | NaN | 1987.0 | 1987.0 | Cleaner | NaN | Darling Downs South West | NaN | Permanent Part-time | ... | Female | 61 or older | NaN | NaN | NaN | NaN | NaN | NaN | False | DETE |
771 | 773 | Resignation-Other employer | 2014.0 | 2002.0 | 2007.0 | Head of Curriculum/Head of Special Education | NaN | Central Queensland | NaN | Permanent Full-time | ... | Male | 36-40 | NaN | NaN | NaN | NaN | NaN | 12.0 | False | DETE |
774 | 776 | Resignation-Other employer | NaN | 2005.0 | 2005.0 | Teacher Aide | NaN | Central Queensland | NaN | Permanent Part-time | ... | Female | 41-45 | NaN | NaN | NaN | NaN | NaN | NaN | False | DETE |
784 | 786 | Resignation-Other reasons | 2013.0 | 2013.0 | 2013.0 | Teacher | Secondary | Central Queensland | NaN | Permanent Full-time | ... | Female | 21-25 | NaN | NaN | NaN | NaN | NaN | 0.0 | True | DETE |
786 | 788 | Resignation-Other employer | 2014.0 | 1994.0 | 2008.0 | Teacher | Secondary | Darling Downs South West | NaN | Permanent Full-time | ... | Female | 41-45 | NaN | NaN | NaN | NaN | NaN | 20.0 | True | DETE |
788 | 790 | Resignation-Other employer | NaN | 1990.0 | 2010.0 | Teacher | Secondary | Metropolitan | NaN | Permanent Full-time | ... | Female | 41-45 | NaN | NaN | NaN | NaN | NaN | NaN | False | DETE |
789 | 791 | Resignation-Other reasons | 2014.0 | 1983.0 | 1999.0 | School Based Professional Staff (Therapist, nu... | NaN | Metropolitan | NaN | Permanent Part-time | ... | Female | 51-55 | NaN | NaN | NaN | NaN | NaN | 31.0 | False | DETE |
790 | 792 | Resignation-Other reasons | 2014.0 | 2008.0 | 2008.0 | Teacher | Secondary | North Coast | NaN | Permanent Full-time | ... | Male | 36-40 | NaN | NaN | NaN | NaN | NaN | 6.0 | True | DETE |
791 | 793 | Resignation-Other reasons | NaN | 2007.0 | 2007.0 | Public Servant | A01-A04 | Metropolitan | NaN | Permanent Part-time | ... | Female | 46-50 | NaN | NaN | NaN | NaN | NaN | NaN | True | DETE |
794 | 796 | Resignation-Move overseas/interstate | 2013.0 | NaN | NaN | Cleaner | NaN | NaN | NaN | Permanent Part-time | ... | Female | 36-40 | NaN | NaN | NaN | NaN | NaN | NaN | False | DETE |
797 | 799 | Resignation-Move overseas/interstate | NaN | 2000.0 | 2013.0 | Public Servant | A01-A04 | South East | NaN | Permanent Part-time | ... | Female | 36-40 | NaN | NaN | NaN | NaN | NaN | NaN | False | DETE |
798 | 800 | Resignation-Move overseas/interstate | NaN | 1995.0 | NaN | Teacher Aide | NaN | Darling Downs South West | NaN | Permanent Part-time | ... | Female | 36-40 | NaN | NaN | NaN | NaN | NaN | NaN | False | DETE |
802 | 804 | Resignation-Move overseas/interstate | 2013.0 | NaN | NaN | Teacher Aide | NaN | Metropolitan | NaN | Permanent Part-time | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | False | DETE |
803 | 805 | Resignation-Other employer | 2014.0 | 2004.0 | 2007.0 | Teacher | Primary | Darling Downs South West | NaN | Permanent Full-time | ... | Female | 46-50 | NaN | NaN | NaN | NaN | NaN | 10.0 | False | DETE |
804 | 806 | Resignation-Other employer | 2014.0 | 2008.0 | 2013.0 | Teacher | Primary | Darling Downs South West | NaN | Permanent Part-time | ... | Female | 26-30 | NaN | NaN | NaN | NaN | NaN | 6.0 | False | DETE |
806 | 808 | Resignation-Other employer | 2013.0 | 2005.0 | 2005.0 | Cleaner | NaN | Central Queensland | NaN | Permanent Part-time | ... | Female | 41-45 | NaN | NaN | NaN | NaN | NaN | 8.0 | False | DETE |
807 | 809 | Resignation-Other reasons | 2013.0 | 2004.0 | 2004.0 | Teacher | Primary | Central Queensland | NaN | Permanent Full-time | ... | Female | 36-40 | NaN | NaN | NaN | NaN | NaN | 9.0 | True | DETE |
808 | 810 | Resignation-Other reasons | 2013.0 | 2010.0 | 2010.0 | Teacher Aide | NaN | NaN | NaN | Permanent Part-time | ... | Female | 26-30 | NaN | NaN | NaN | NaN | NaN | 3.0 | False | DETE |
815 | 817 | Resignation-Other employer | 2014.0 | 2012.0 | 2012.0 | Teacher | Primary | Far North Queensland | NaN | Permanent Full-time | ... | Male | 21-25 | NaN | NaN | NaN | NaN | NaN | 2.0 | False | DETE |
816 | 818 | Resignation-Move overseas/interstate | 2014.0 | 2012.0 | 2012.0 | Teacher | Secondary | North Coast | NaN | Permanent Full-time | ... | Female | 21-25 | NaN | NaN | NaN | NaN | NaN | 2.0 | False | DETE |
819 | 821 | Resignation-Move overseas/interstate | 2014.0 | 2009.0 | 2009.0 | Public Servant | A01-A04 | Central Office | Education Queensland | Permanent Full-time | ... | Female | 31-35 | NaN | NaN | NaN | NaN | NaN | 5.0 | True | DETE |
821 | 823 | Resignation-Move overseas/interstate | 2013.0 | NaN | NaN | Teacher Aide | NaN | Metropolitan | NaN | NaN | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | False | DETE |
311 rows × 38 columns
# Adding a column to lable each row as TAFE
tafe_resignations_up['institute'] = 'TAFE'
tafe_resignations_up
id | Institute | WorkArea | cease_date | separationtype | Contributing Factors. Career Move - Public Sector | Contributing Factors. Career Move - Private Sector | Contributing Factors. Career Move - Self-employment | Contributing Factors. Ill Health | Contributing Factors. Maternity/Family | ... | Contributing Factors. Other | Contributing Factors. NONE | gender | age | employment_status | position | institute_service | role_service | dissatisfied | institute | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3 | 6.341399e+17 | Mount Isa Institute of TAFE | Non-Delivery (corporate) | 2010.0 | Resignation | - | - | - | - | - | ... | - | - | NaN | NaN | NaN | NaN | NaN | NaN | False | TAFE |
4 | 6.341466e+17 | Southern Queensland Institute of TAFE | Delivery (teaching) | 2010.0 | Resignation | - | Career Move - Private Sector | - | - | - | ... | - | - | Male | 41 45 | Permanent Full-time | Teacher (including LVT) | 3-4 | 3-4 | False | TAFE |
5 | 6.341475e+17 | Southern Queensland Institute of TAFE | Delivery (teaching) | 2010.0 | Resignation | - | - | - | - | - | ... | Other | - | Female | 56 or older | Contract/casual | Teacher (including LVT) | 7-10 | 7-10 | False | TAFE |
6 | 6.341520e+17 | Barrier Reef Institute of TAFE | Non-Delivery (corporate) | 2010.0 | Resignation | - | Career Move - Private Sector | - | - | Maternity/Family | ... | Other | - | Male | 20 or younger | Temporary Full-time | Administration (AO) | 3-4 | 3-4 | False | TAFE |
7 | 6.341537e+17 | Southern Queensland Institute of TAFE | Delivery (teaching) | 2010.0 | Resignation | - | - | - | - | - | ... | Other | - | Male | 46 50 | Permanent Full-time | Teacher (including LVT) | 3-4 | 3-4 | False | TAFE |
8 | 6.341579e+17 | Southern Queensland Institute of TAFE | Delivery (teaching) | 2009.0 | Resignation | - | - | - | - | - | ... | Other | - | Female | 36 40 | Temporary Full-time | Tutor | 3-4 | 3-4 | False | TAFE |
9 | 6.341588e+17 | Barrier Reef Institute of TAFE | Non-Delivery (corporate) | 2010.0 | Resignation | Career Move - Public Sector | - | - | - | - | ... | Other | - | Female | 21 25 | Permanent Full-time | Administration (AO) | 1-2 | 1-2 | False | TAFE |
10 | 6.341588e+17 | Barrier Reef Institute of TAFE | Non-Delivery (corporate) | 2010.0 | Resignation | Career Move - Public Sector | - | - | - | - | ... | - | - | Female | 41 45 | Temporary Part-time | Administration (AO) | Less than 1 year | Less than 1 year | False | TAFE |
13 | 6.341725e+17 | Barrier Reef Institute of TAFE | Non-Delivery (corporate) | 2010.0 | Resignation | - | Career Move - Private Sector | - | - | - | ... | - | - | Female | 31 35 | Temporary Full-time | Administration (AO) | 11-20 | Less than 1 year | False | TAFE |
14 | 6.341726e+17 | Central Queensland Institute of TAFE | Delivery (teaching) | 2010.0 | Resignation | - | Career Move - Private Sector | - | - | - | ... | - | - | Female | 31 35 | Permanent Part-time | Teacher (including LVT) | 7-10 | 7-10 | True | TAFE |
15 | 6.341761e+17 | Southern Queensland Institute of TAFE | Non-Delivery (corporate) | 2010.0 | Resignation | - | - | - | - | - | ... | Other | - | Female | 46 50 | Permanent Part-time | Technical Officer (TO) | 11-20 | 11-20 | False | TAFE |
16 | 6.341770e+17 | Brisbane North Institute of TAFE | Non-Delivery (corporate) | 2010.0 | Resignation | NaN | NaN | NaN | NaN | NaN | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | TAFE |
17 | 6.341771e+17 | Brisbane North Institute of TAFE | Non-Delivery (corporate) | 2010.0 | Resignation | Career Move - Public Sector | - | - | - | - | ... | - | - | Female | 31 35 | Permanent Full-time | Administration (AO) | 7-10 | 1-2 | True | TAFE |
18 | 6.341779e+17 | Brisbane North Institute of TAFE | Delivery (teaching) | 2010.0 | Resignation | NaN | NaN | NaN | NaN | NaN | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | TAFE |
19 | 6.341820e+17 | Southbank Institute of Technology | Non-Delivery (corporate) | 2010.0 | Resignation | - | - | - | - | - | ... | - | NONE | NaN | NaN | NaN | NaN | NaN | NaN | False | TAFE |
20 | 6.341821e+17 | Brisbane North Institute of TAFE | Non-Delivery (corporate) | 2010.0 | Resignation | - | - | - | - | - | ... | - | - | NaN | NaN | NaN | NaN | NaN | NaN | True | TAFE |
21 | 6.341831e+17 | Brisbane North Institute of TAFE | Non-Delivery (corporate) | 2010.0 | Resignation | - | Career Move - Private Sector | - | - | - | ... | - | - | NaN | NaN | NaN | NaN | NaN | NaN | False | TAFE |
22 | 6.341847e+17 | Southern Queensland Institute of TAFE | Non-Delivery (corporate) | 2010.0 | Resignation | Career Move - Public Sector | - | - | - | - | ... | Other | - | Male | 26 30 | Temporary Full-time | Administration (AO) | 5-6 | 5-6 | False | TAFE |
23 | 6.341907e+17 | Central Queensland Institute of TAFE | Non-Delivery (corporate) | 2010.0 | Resignation | - | - | - | - | - | ... | - | - | Female | 26 30 | Contract/casual | Administration (AO) | Less than 1 year | Less than 1 year | False | TAFE |
24 | 6.341907e+17 | Central Queensland Institute of TAFE | Delivery (teaching) | 2010.0 | Resignation | - | Career Move - Private Sector | - | - | - | ... | - | - | Female | 31 35 | Permanent Part-time | Teacher (including LVT) | 7-10 | 7-10 | False | TAFE |
26 | 6.341934e+17 | Mount Isa Institute of TAFE | Non-Delivery (corporate) | 2010.0 | Resignation | - | Career Move - Private Sector | - | - | - | ... | - | - | NaN | NaN | NaN | NaN | NaN | NaN | True | TAFE |
27 | 6.341935e+17 | Brisbane North Institute of TAFE | Non-Delivery (corporate) | 2010.0 | Resignation | Career Move - Public Sector | - | - | - | - | ... | - | - | Male | 56 or older | Temporary Full-time | Administration (AO) | More than 20 years | 7-10 | False | TAFE |
29 | 6.341994e+17 | Barrier Reef Institute of TAFE | Non-Delivery (corporate) | 2010.0 | Resignation | - | Career Move - Private Sector | - | - | - | ... | - | - | Female | 31 35 | Temporary Full-time | Administration (AO) | Less than 1 year | Less than 1 year | False | TAFE |
32 | 6.342002e+17 | Brisbane North Institute of TAFE | Non-Delivery (corporate) | 2010.0 | Resignation | - | Career Move - Private Sector | - | - | - | ... | - | - | Female | 46 50 | Temporary Part-time | Professional Officer (PO) | Less than 1 year | Less than 1 year | False | TAFE |
36 | 6.342062e+17 | Sunshine Coast Institute of TAFE | Non-Delivery (corporate) | 2010.0 | Resignation | Career Move - Public Sector | Career Move - Private Sector | - | - | - | ... | Other | - | NaN | NaN | NaN | NaN | NaN | NaN | False | TAFE |
37 | 6.342080e+17 | Southbank Institute of Technology | Non-Delivery (corporate) | 2010.0 | Resignation | - | - | - | - | - | ... | - | - | NaN | NaN | NaN | NaN | NaN | NaN | False | TAFE |
39 | 6.342081e+17 | Southbank Institute of Technology | Non-Delivery (corporate) | 2010.0 | Resignation | Career Move - Public Sector | - | - | - | - | ... | - | - | NaN | NaN | NaN | NaN | NaN | NaN | False | TAFE |
40 | 6.342090e+17 | Sunshine Coast Institute of TAFE | Non-Delivery (corporate) | 2010.0 | Resignation | - | - | - | - | - | ... | - | - | Female | 26 30 | Temporary Part-time | Administration (AO) | Less than 1 year | Less than 1 year | True | TAFE |
41 | 6.342090e+17 | Sunshine Coast Institute of TAFE | Delivery (teaching) | 2010.0 | Resignation | - | - | Career Move - Self-employment | - | - | ... | - | - | Female | 36 40 | Permanent Full-time | Teacher (including LVT) | 11-20 | 11-20 | False | TAFE |
42 | 6.342090e+17 | Sunshine Coast Institute of TAFE | Delivery (teaching) | 2010.0 | Resignation | - | - | Career Move - Self-employment | - | - | ... | - | - | Male | 31 35 | Permanent Full-time | Teacher (including LVT) | 3-4 | 3-4 | False | TAFE |
... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
659 | 6.349985e+17 | Southern Queensland Institute of TAFE | Non-Delivery (corporate) | 2013.0 | Resignation | - | Career Move - Private Sector | - | - | - | ... | - | - | Female | 46 50 | Temporary Part-time | Administration (AO) | 1-2 | 1-2 | False | TAFE |
660 | 6.349994e+17 | Central Queensland Institute of TAFE | Non-Delivery (corporate) | 2013.0 | Resignation | - | - | - | - | - | ... | Other | - | Female | 41 45 | Permanent Part-time | Administration (AO) | 3-4 | 3-4 | False | TAFE |
661 | 6.350003e+17 | Brisbane North Institute of TAFE | Non-Delivery (corporate) | 2013.0 | Resignation | - | Career Move - Private Sector | - | - | - | ... | - | - | Female | 46 50 | Permanent Full-time | Administration (AO) | 5-6 | More than 20 years | True | TAFE |
665 | 6.350055e+17 | Tropical North Institute of TAFE | Delivery (teaching) | 2013.0 | Resignation | - | - | - | Ill Health | - | ... | - | - | NaN | NaN | NaN | NaN | NaN | NaN | False | TAFE |
666 | 6.350055e+17 | Tropical North Institute of TAFE | Delivery (teaching) | 2013.0 | Resignation | - | - | - | - | - | ... | - | - | NaN | NaN | NaN | NaN | NaN | NaN | False | TAFE |
669 | 6.350108e+17 | Brisbane North Institute of TAFE | Non-Delivery (corporate) | 2013.0 | Resignation | - | - | - | - | - | ... | Other | - | Female | 26 30 | Temporary Full-time | Administration (AO) | 3-4 | 3-4 | False | TAFE |
670 | 6.350124e+17 | Tropical North Institute of TAFE | Delivery (teaching) | 2013.0 | Resignation | NaN | NaN | NaN | NaN | NaN | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | TAFE |
671 | 6.350127e+17 | Tropical North Institute of TAFE | Delivery (teaching) | 2013.0 | Resignation | - | - | - | - | - | ... | - | - | Female | 46 50 | Temporary Full-time | Teacher (including LVT) | Less than 1 year | Less than 1 year | True | TAFE |
675 | 6.350175e+17 | Tropical North Institute of TAFE | Delivery (teaching) | 2013.0 | Resignation | - | - | - | - | - | ... | Other | - | Male | 51-55 | Temporary Full-time | Teacher (including LVT) | Less than 1 year | Less than 1 year | True | TAFE |
676 | 6.350194e+17 | Southern Queensland Institute of TAFE | Non-Delivery (corporate) | 2013.0 | Resignation | Career Move - Public Sector | - | - | - | - | ... | - | - | Female | 41 45 | Contract/casual | Administration (AO) | 1-2 | Less than 1 year | False | TAFE |
677 | 6.350219e+17 | Brisbane North Institute of TAFE | Non-Delivery (corporate) | 2013.0 | Resignation | - | - | - | - | - | ... | Other | - | Female | 36 40 | Temporary Full-time | Administration (AO) | Less than 1 year | Less than 1 year | False | TAFE |
678 | 6.350253e+17 | Brisbane North Institute of TAFE | Non-Delivery (corporate) | 2013.0 | Resignation | - | Career Move - Private Sector | - | - | - | ... | - | - | Male | 51-55 | Permanent Full-time | Administration (AO) | 3-4 | 3-4 | False | TAFE |
679 | 6.350279e+17 | Southern Queensland Institute of TAFE | Non-Delivery (corporate) | 2013.0 | Resignation | - | - | - | Ill Health | - | ... | - | - | Female | 56 or older | Temporary Part-time | Operational (OO) | 1-2 | 1-2 | False | TAFE |
681 | 6.350314e+17 | Central Queensland Institute of TAFE | Non-Delivery (corporate) | 2013.0 | Resignation | - | - | - | - | - | ... | Other | - | Female | 26 30 | Temporary Full-time | Administration (AO) | Less than 1 year | Less than 1 year | False | TAFE |
682 | 6.350357e+17 | Mount Isa Institute of TAFE | Non-Delivery (corporate) | 2013.0 | Resignation | Career Move - Public Sector | - | - | - | - | ... | - | - | Female | 26 30 | Permanent Part-time | Administration (AO) | Less than 1 year | Less than 1 year | False | TAFE |
683 | 6.350374e+17 | Central Queensland Institute of TAFE | Non-Delivery (corporate) | 2013.0 | Resignation | - | - | - | - | - | ... | Other | - | Female | 41 45 | Temporary Full-time | Administration (AO) | Less than 1 year | Less than 1 year | False | TAFE |
684 | 6.350375e+17 | Brisbane North Institute of TAFE | Non-Delivery (corporate) | 2013.0 | Resignation | Career Move - Public Sector | - | - | - | - | ... | - | - | Male | 41 45 | Contract/casual | Administration (AO) | 3-4 | Less than 1 year | False | TAFE |
685 | 6.350402e+17 | Brisbane North Institute of TAFE | Non-Delivery (corporate) | 2013.0 | Resignation | - | - | - | - | - | ... | - | - | Female | 26 30 | Temporary Full-time | Technical Officer (TO) | 1-2 | 1-2 | True | TAFE |
686 | 6.350426e+17 | Brisbane North Institute of TAFE | Non-Delivery (corporate) | 2013.0 | Resignation | Career Move - Public Sector | - | - | - | - | ... | - | - | Female | 41 45 | Temporary Full-time | Administration (AO) | 5-6 | 5-6 | False | TAFE |
688 | 6.350479e+17 | Tropical North Institute of TAFE | Non-Delivery (corporate) | 2013.0 | Resignation | - | - | - | - | - | ... | - | NONE | Female | 46 50 | Permanent Part-time | Professional Officer (PO) | 5-6 | 5-6 | False | TAFE |
689 | 6.350480e+17 | Central Queensland Institute of TAFE | Delivery (teaching) | 2013.0 | Resignation | - | - | - | Ill Health | - | ... | - | - | Male | 41 45 | Permanent Full-time | Teacher (including LVT) | Less than 1 year | Less than 1 year | True | TAFE |
690 | 6.350496e+17 | Southern Queensland Institute of TAFE | Non-Delivery (corporate) | 2013.0 | Resignation | - | - | - | Ill Health | - | ... | - | - | NaN | NaN | NaN | NaN | NaN | NaN | False | TAFE |
691 | 6.350496e+17 | Southern Queensland Institute of TAFE | Non-Delivery (corporate) | 2013.0 | Resignation | - | - | - | Ill Health | - | ... | - | - | Female | 56 or older | Permanent Part-time | Operational (OO) | 3-4 | 3-4 | False | TAFE |
693 | 6.350599e+17 | Tropical North Institute of TAFE | Non-Delivery (corporate) | 2013.0 | Resignation | - | Career Move - Private Sector | - | - | - | ... | - | - | Female | 26 30 | Temporary Full-time | Administration (AO) | 1-2 | 1-2 | False | TAFE |
694 | 6.350652e+17 | Sunshine Coast Institute of TAFE | Non-Delivery (corporate) | 2013.0 | Resignation | - | Career Move - Private Sector | - | - | - | ... | - | - | NaN | NaN | NaN | NaN | NaN | NaN | False | TAFE |
696 | 6.350660e+17 | Southern Queensland Institute of TAFE | Non-Delivery (corporate) | 2013.0 | Resignation | - | Career Move - Private Sector | - | - | - | ... | - | - | Male | 21 25 | Temporary Full-time | Operational (OO) | 5-6 | 5-6 | False | TAFE |
697 | 6.350668e+17 | Barrier Reef Institute of TAFE | Delivery (teaching) | 2013.0 | Resignation | Career Move - Public Sector | - | - | - | - | ... | - | - | Male | 51-55 | Temporary Full-time | Teacher (including LVT) | 1-2 | 1-2 | False | TAFE |
698 | 6.350677e+17 | Southern Queensland Institute of TAFE | Non-Delivery (corporate) | 2013.0 | Resignation | Career Move - Public Sector | - | - | - | - | ... | - | - | NaN | NaN | NaN | NaN | NaN | NaN | False | TAFE |
699 | 6.350704e+17 | Tropical North Institute of TAFE | Delivery (teaching) | 2013.0 | Resignation | - | - | - | - | - | ... | Other | - | Female | 51-55 | Permanent Full-time | Teacher (including LVT) | 5-6 | 1-2 | False | TAFE |
701 | 6.350730e+17 | Tropical North Institute of TAFE | Non-Delivery (corporate) | 2013.0 | Resignation | - | - | Career Move - Self-employment | - | - | ... | - | - | Female | 26 30 | Contract/casual | Administration (AO) | 3-4 | 1-2 | False | TAFE |
340 rows × 25 columns
combined = pd.concat([tafe_resignations_up, dete_resignations_up], axis=0, ignore_index=True)
combined['institute_service'].value_counts().sum()
combined.info()
<class 'pandas.core.frame.DataFrame'> RangeIndex: 651 entries, 0 to 650 Data columns (total 53 columns): Contributing Factors. Career Move - Private Sector 332 non-null object Contributing Factors. Career Move - Public Sector 332 non-null object Contributing Factors. Career Move - Self-employment 332 non-null object Contributing Factors. Dissatisfaction 332 non-null object Contributing Factors. Ill Health 332 non-null object Contributing Factors. Interpersonal Conflict 332 non-null object Contributing Factors. Job Dissatisfaction 332 non-null object Contributing Factors. Maternity/Family 332 non-null object Contributing Factors. NONE 332 non-null object Contributing Factors. Other 332 non-null object Contributing Factors. Study 332 non-null object Contributing Factors. Travel 332 non-null object Institute 340 non-null object WorkArea 340 non-null object aboriginal 7 non-null object age 596 non-null object business_unit 32 non-null object career_move_to_private_sector 311 non-null object career_move_to_public_sector 311 non-null object cease_date 635 non-null float64 classification 161 non-null object dete_start_date 283 non-null float64 disability 8 non-null object dissatisfaction_with_the_department 311 non-null object dissatisfied 643 non-null object employment_conditions 311 non-null object employment_status 597 non-null object gender 592 non-null object id 651 non-null float64 ill_health 311 non-null object institute 651 non-null object institute_service 563 non-null object interpersonal_conflicts 311 non-null object job_dissatisfaction 311 non-null object lack_of_job_security 311 non-null object lack_of_recognition 311 non-null object maternity/family 311 non-null object nesb 9 non-null object none_of_the_above 311 non-null object physical_work_environment 311 non-null object position 598 non-null object region 265 non-null object relocation 311 non-null object role_service 290 non-null object role_start_date 271 non-null float64 separationtype 651 non-null object south_sea 3 non-null object study/travel 311 non-null object torres_strait 0 non-null object traumatic_incident 311 non-null object work_life_balance 311 non-null object work_location 311 non-null object workload 311 non-null object dtypes: float64(4), object(49) memory usage: 269.6+ KB
# Combining the datasets into one
combined_up = combined.dropna(thresh = 500 , axis=1).copy()
#combined_up['institute_service'].value_counts().sum()
combined_up.info()
<class 'pandas.core.frame.DataFrame'> RangeIndex: 651 entries, 0 to 650 Data columns (total 10 columns): age 596 non-null object cease_date 635 non-null float64 dissatisfied 643 non-null object employment_status 597 non-null object gender 592 non-null object id 651 non-null float64 institute 651 non-null object institute_service 563 non-null object position 598 non-null object separationtype 651 non-null object dtypes: float64(2), object(8) memory usage: 50.9+ KB
In the below cells we will convert the years of service into uniform categories or buckets:
combined_up['institute_service'].value_counts(dropna=False)
NaN 88 Less than 1 year 73 1-2 64 3-4 63 5-6 33 11-20 26 5.0 23 1.0 22 7-10 21 0.0 20 3.0 20 6.0 17 4.0 16 9.0 14 2.0 14 7.0 13 More than 20 years 10 8.0 8 13.0 8 15.0 7 20.0 7 10.0 6 12.0 6 22.0 6 14.0 6 17.0 6 18.0 5 16.0 5 11.0 4 23.0 4 24.0 4 19.0 3 21.0 3 39.0 3 32.0 3 28.0 2 30.0 2 25.0 2 36.0 2 26.0 2 27.0 1 29.0 1 31.0 1 33.0 1 34.0 1 35.0 1 38.0 1 41.0 1 42.0 1 49.0 1 Name: institute_service, dtype: int64
combined_up['institute_service'] = combined_up['institute_service'].astype(str)
yrs = r'([0-9]?[0-9])'
combined_up['institute_service'] = combined_up['institute_service'].str.extract(yrs, expand=False).astype(float)
combined_up['institute_service'].value_counts(dropna=False)
1.0 159 NaN 88 3.0 83 5.0 56 7.0 34 11.0 30 0.0 20 20.0 17 6.0 17 4.0 16 2.0 14 9.0 14 13.0 8 8.0 8 15.0 7 10.0 6 14.0 6 17.0 6 22.0 6 12.0 6 18.0 5 16.0 5 24.0 4 23.0 4 19.0 3 32.0 3 39.0 3 21.0 3 30.0 2 26.0 2 36.0 2 28.0 2 25.0 2 35.0 1 38.0 1 34.0 1 33.0 1 49.0 1 41.0 1 27.0 1 42.0 1 29.0 1 31.0 1 Name: institute_service, dtype: int64
# Below is a function in order to asign the above values into buckets for further analysis.
def mod_def(x):
if pd.isnull(x):
return 'No Data'
elif x < 3:
return 'New'
elif x < 7:
return 'Experienced'
elif x < 10:
return 'Established'
else:
return 'Veteran'
# Below we will be using the above function.
combined_up['service_cat'] = combined_up['institute_service'].apply(mod_def).copy()
combined_up['service_cat'].value_counts()
New 193 Experienced 172 Veteran 142 No Data 88 Established 56 Name: service_cat, dtype: int64
combined_up['dissatisfied'].value_counts(dropna=False)
False 403 True 240 NaN 8 Name: dissatisfied, dtype: int64
# Converting Nan values to False.
combined_up['dissatisfied'] = combined_up['dissatisfied'].fillna(False)
combined_up['dissatisfied'].value_counts()
False 411 True 240 Name: dissatisfied, dtype: int64
# creating a pivot in order to view the average level of dissatisfaction for each tenure group
com_piv = combined_up.pivot_table(values = 'dissatisfied', index = 'service_cat')
com_piv
dissatisfied | |
---|---|
service_cat | |
Established | 0.553571 |
Experienced | 0.343023 |
New | 0.295337 |
No Data | 0.295455 |
Veteran | 0.471831 |
com_piv.plot(kind='bar')
<matplotlib.axes._subplots.AxesSubplot at 0x7f4ff0a368d0>
Interestingly the highest percentage of dissatisfied leavers is actually within the established and veteran employees. Interestingly this is the category that might be most impacted by the exclusion of the retiring employees from the analysis. It is forseeable though not validated that a bias exists in this category of emplyee by excluding the retirment data.
It is also interesting in that the 'Established' category of employees had the fewest number of resignations when combaired to the other categories and 'New' employees had the lowest percentage of dissatisfied resignations but the greatest amount of overall churn.
To answer the first question regarding Tenure, 30% of short tenured staff are resigning due to dissatisfaction and 55% and 47% of the Established and Veteran staff are resigning due to dissatisfaction. Indicating that dissatisfaction is a significant factor in both groups.
per_piv = combined_up.pivot_table(values = 'dissatisfied', index = 'employment_status')
per_piv
dissatisfied | |
---|---|
employment_status | |
Casual | 0.200000 |
Contract/casual | 0.172414 |
Permanent Full-time | 0.460938 |
Permanent Part-time | 0.426667 |
Temporary Full-time | 0.258333 |
Temporary Part-time | 0.162162 |
combined_up['employment_status'].value_counts(dropna=False)
Permanent Full-time 256 Permanent Part-time 150 Temporary Full-time 120 NaN 54 Temporary Part-time 37 Contract/casual 29 Casual 5 Name: employment_status, dtype: int64
Interestingly looking at the above the most dissatisfied leavers by employment status are the Permanent employees compared to Temp, Casual, and Contract based.
no_data_snapshot = combined_up[combined_up['service_cat']=='No Data']
no_data_snapshot
age | cease_date | dissatisfied | employment_status | gender | id | institute | institute_service | position | separationtype | service_cat | |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | NaN | 2010.0 | False | NaN | NaN | 6.341399e+17 | TAFE | NaN | NaN | Resignation | No Data |
11 | NaN | 2010.0 | False | NaN | NaN | 6.341770e+17 | TAFE | NaN | NaN | Resignation | No Data |
13 | NaN | 2010.0 | False | NaN | NaN | 6.341779e+17 | TAFE | NaN | NaN | Resignation | No Data |
14 | NaN | 2010.0 | False | NaN | NaN | 6.341820e+17 | TAFE | NaN | NaN | Resignation | No Data |
15 | NaN | 2010.0 | True | NaN | NaN | 6.341821e+17 | TAFE | NaN | NaN | Resignation | No Data |
16 | NaN | 2010.0 | False | NaN | NaN | 6.341831e+17 | TAFE | NaN | NaN | Resignation | No Data |
20 | NaN | 2010.0 | True | NaN | NaN | 6.341934e+17 | TAFE | NaN | NaN | Resignation | No Data |
24 | NaN | 2010.0 | False | NaN | NaN | 6.342062e+17 | TAFE | NaN | NaN | Resignation | No Data |
25 | NaN | 2010.0 | False | NaN | NaN | 6.342080e+17 | TAFE | NaN | NaN | Resignation | No Data |
26 | NaN | 2010.0 | False | NaN | NaN | 6.342081e+17 | TAFE | NaN | NaN | Resignation | No Data |
34 | NaN | 2010.0 | False | NaN | NaN | 6.342141e+17 | TAFE | NaN | NaN | Resignation | No Data |
36 | NaN | 2010.0 | False | NaN | NaN | 6.342148e+17 | TAFE | NaN | NaN | Resignation | No Data |
37 | NaN | 2010.0 | True | NaN | NaN | 6.342174e+17 | TAFE | NaN | NaN | Resignation | No Data |
56 | NaN | 2010.0 | False | NaN | NaN | 6.342574e+17 | TAFE | NaN | NaN | Resignation | No Data |
59 | NaN | 2010.0 | False | NaN | NaN | 6.342661e+17 | TAFE | NaN | NaN | Resignation | No Data |
62 | NaN | 2011.0 | False | NaN | NaN | 6.342679e+17 | TAFE | NaN | NaN | Resignation | No Data |
64 | NaN | 2011.0 | True | NaN | NaN | 6.342686e+17 | TAFE | NaN | NaN | Resignation | No Data |
67 | NaN | 2010.0 | True | NaN | NaN | 6.342745e+17 | TAFE | NaN | NaN | Resignation | No Data |
68 | NaN | 2010.0 | True | NaN | NaN | 6.342746e+17 | TAFE | NaN | NaN | Resignation | No Data |
74 | NaN | NaN | True | NaN | NaN | 6.342978e+17 | TAFE | NaN | NaN | Resignation | No Data |
86 | NaN | 2011.0 | False | NaN | NaN | 6.343264e+17 | TAFE | NaN | NaN | Resignation | No Data |
91 | NaN | NaN | True | NaN | NaN | 6.343283e+17 | TAFE | NaN | NaN | Resignation | No Data |
94 | NaN | 2011.0 | False | NaN | NaN | 6.343333e+17 | TAFE | NaN | NaN | Resignation | No Data |
108 | NaN | 2011.0 | True | NaN | NaN | 6.343811e+17 | TAFE | NaN | NaN | Resignation | No Data |
129 | NaN | 2010.0 | True | NaN | NaN | 6.344568e+17 | TAFE | NaN | NaN | Resignation | No Data |
142 | NaN | 2010.0 | True | NaN | NaN | 6.344993e+17 | TAFE | NaN | NaN | Resignation | No Data |
150 | NaN | 2011.0 | False | NaN | NaN | 6.345234e+17 | TAFE | NaN | NaN | Resignation | No Data |
155 | NaN | 2011.0 | False | NaN | NaN | 6.345510e+17 | TAFE | NaN | NaN | Resignation | No Data |
161 | NaN | 2011.0 | False | NaN | NaN | 6.345581e+17 | TAFE | NaN | NaN | Resignation | No Data |
163 | NaN | 2011.0 | False | NaN | NaN | 6.345632e+17 | TAFE | NaN | NaN | Resignation | No Data |
... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
441 | 46-50 | 2012.0 | False | Permanent Part-time | Female | 3.020000e+02 | DETE | NaN | School Administrative Staff | Resignation-Other employer | No Data |
457 | 41-45 | 2012.0 | False | Permanent Part-time | Female | 3.440000e+02 | DETE | NaN | School Administrative Staff | Resignation-Other employer | No Data |
464 | 26-30 | 2012.0 | False | Permanent Full-time | Male | 3.660000e+02 | DETE | NaN | Teacher | Resignation-Other reasons | No Data |
472 | 26-30 | 2012.0 | False | Permanent Part-time | Female | 3.800000e+02 | DETE | NaN | Teacher | Resignation-Move overseas/interstate | No Data |
480 | 56-60 | 2013.0 | True | NaN | Male | 4.000000e+02 | DETE | NaN | Cleaner | Resignation-Other employer | No Data |
481 | NaN | 2012.0 | False | NaN | NaN | 4.060000e+02 | DETE | NaN | Teacher | Resignation-Other reasons | No Data |
483 | 61 or older | 2013.0 | False | Temporary Part-time | Male | 4.080000e+02 | DETE | NaN | Technical Officer | Resignation-Move overseas/interstate | No Data |
485 | 36-40 | 2012.0 | False | Permanent Part-time | Female | 4.100000e+02 | DETE | NaN | Teacher Aide | Resignation-Other reasons | No Data |
498 | 21-25 | 2013.0 | False | Permanent Full-time | Female | 4.390000e+02 | DETE | NaN | Teacher | Resignation-Other employer | No Data |
501 | 36-40 | 2012.0 | True | Permanent Full-time | Male | 4.500000e+02 | DETE | NaN | Teacher | Resignation-Other employer | No Data |
511 | 56-60 | 2013.0 | True | Permanent Part-time | Female | 4.720000e+02 | DETE | NaN | Teacher | Resignation-Other reasons | No Data |
520 | 46-50 | 2012.0 | False | NaN | Female | 4.900000e+02 | DETE | NaN | Cleaner | Resignation-Other reasons | No Data |
532 | 56-60 | 2013.0 | True | Permanent Part-time | Female | 5.320000e+02 | DETE | NaN | Cleaner | Resignation-Other reasons | No Data |
536 | 26-30 | 2013.0 | True | Permanent Full-time | Male | 5.390000e+02 | DETE | NaN | Teacher | Resignation-Other reasons | No Data |
585 | 46-50 | 2013.0 | False | Permanent Part-time | Female | 6.630000e+02 | DETE | NaN | Teacher | Resignation-Other reasons | No Data |
595 | 21-25 | NaN | True | Permanent Full-time | Male | 6.850000e+02 | DETE | NaN | Teacher | Resignation-Other employer | No Data |
603 | 46-50 | NaN | False | Casual | Female | 6.960000e+02 | DETE | NaN | Teacher Aide | Resignation-Other reasons | No Data |
609 | 41-45 | NaN | False | Permanent Full-time | Female | 7.060000e+02 | DETE | NaN | Teacher Aide | Resignation-Other reasons | No Data |
610 | 51-55 | NaN | True | Permanent Full-time | Female | 7.110000e+02 | DETE | NaN | Teacher | Resignation-Other employer | No Data |
611 | 61 or older | 2013.0 | False | Permanent Part-time | Female | 7.140000e+02 | DETE | NaN | Teacher Aide | Resignation-Other reasons | No Data |
613 | 46-50 | NaN | False | Permanent Full-time | Female | 7.260000e+02 | DETE | NaN | Teacher | Resignation-Other reasons | No Data |
629 | 61 or older | NaN | False | Permanent Part-time | Female | 7.720000e+02 | DETE | NaN | Cleaner | Resignation-Other reasons | No Data |
631 | 41-45 | NaN | False | Permanent Part-time | Female | 7.760000e+02 | DETE | NaN | Teacher Aide | Resignation-Other employer | No Data |
634 | 41-45 | NaN | False | Permanent Full-time | Female | 7.900000e+02 | DETE | NaN | Teacher | Resignation-Other employer | No Data |
637 | 46-50 | NaN | True | Permanent Part-time | Female | 7.930000e+02 | DETE | NaN | Public Servant | Resignation-Other reasons | No Data |
638 | 36-40 | 2013.0 | False | Permanent Part-time | Female | 7.960000e+02 | DETE | NaN | Cleaner | Resignation-Move overseas/interstate | No Data |
639 | 36-40 | NaN | False | Permanent Part-time | Female | 7.990000e+02 | DETE | NaN | Public Servant | Resignation-Move overseas/interstate | No Data |
640 | 36-40 | NaN | False | Permanent Part-time | Female | 8.000000e+02 | DETE | NaN | Teacher Aide | Resignation-Move overseas/interstate | No Data |
641 | NaN | 2013.0 | False | Permanent Part-time | NaN | 8.040000e+02 | DETE | NaN | Teacher Aide | Resignation-Move overseas/interstate | No Data |
650 | NaN | 2013.0 | False | NaN | NaN | 8.230000e+02 | DETE | NaN | Teacher Aide | Resignation-Move overseas/interstate | No Data |
88 rows × 11 columns
no_data_snapshot['employment_status'].value_counts(dropna=False)
NaN 54 Permanent Part-time 20 Permanent Full-time 11 Temporary Part-time 2 Casual 1 Name: employment_status, dtype: int64
no_data_snapshot['dissatisfied'].value_counts(dropna=False)
False 62 True 26 Name: dissatisfied, dtype: int64
26/no_data_snapshot['dissatisfied'].value_counts(dropna=False).sum()
0.29545454545454547
In the above three cells we looked at just those employees where the 'service_cat' was blank in attempt to classify the Nan values. At first glace only 29% of those individuals were dissatisfied. Unfortunately more than half had not populated the 'employment status' column either. Additionally, the age category of these lines of data was not consistantly filled out. We were therefor chose not to allocate the Nan values to another service_cat. The Nan values represent approximately 8% of the total data and we felt this was non-negligable. We felt that it would be better to ignore them in this instance rather than inadvertaintly skew the data.
org_piv = combined_up.pivot_table(values = 'dissatisfied', index = 'institute')
org_piv
dissatisfied | |
---|---|
institute | |
DETE | 0.479100 |
TAFE | 0.267647 |
Interestingly 48% of DETE employees were dissatisfied as opposed to 26% of TAFE employees.
ta = combined_up[combined_up['institute']=="TAFE"]
ta['dissatisfied'].value_counts(dropna=False)
False 249 True 91 Name: dissatisfied, dtype: int64
de = combined_up[combined_up['institute']=="DETE"]
de['dissatisfied'].value_counts(dropna=False)
False 162 True 149 Name: dissatisfied, dtype: int64
# value counts of the 'age' column in order to get visability of the data.
combined_up['age'].value_counts(dropna=False)
51-55 71 NaN 55 41-45 48 41 45 45 46-50 42 36-40 41 46 50 39 26-30 35 21 25 33 26 30 32 31 35 32 36 40 32 31-35 29 56 or older 29 21-25 29 56-60 26 61 or older 23 20 or younger 10 Name: age, dtype: int64
We will conduct a similar analyis as we did with Tenure however this time we wil use the age column.
We will start by bucketing them into:
# we will extract the first number from each age
combined_up['age'] = combined_up['age'].astype(str)
age = r'([0-9]?[0-9])'
combined_up['age'] = combined_up['age'].str.extract(age, expand=False).astype(float)
combined_up['age'].value_counts(dropna=False)
41.0 93 46.0 81 36.0 73 51.0 71 26.0 67 21.0 62 31.0 61 56.0 55 NaN 55 61.0 23 20.0 10 Name: age, dtype: int64
# Below is a function in order to asign the above values into buckets for further analysis.
def age_def(x):
if pd.isnull(x):
return 'No Data'
elif x < 31:
return 'early'
elif x < 41:
return 'settled'
elif x < 51:
return 'mid_age'
elif x < 61:
return 'late'
else:
return 'senior'
# Below we will be using the above function.
combined_up['age_group'] = combined_up['age'].apply(age_def).copy()
combined_up['age_group'].value_counts()
mid_age 174 early 139 settled 134 late 126 No Data 55 senior 23 Name: age_group, dtype: int64
# creating a pivot in order to view the average level of dissatisfaction for each age group
age_piv = combined_up.pivot_table(values = 'dissatisfied', index = 'age_group')
age_piv
dissatisfied | |
---|---|
age_group | |
No Data | 0.254545 |
early | 0.352518 |
late | 0.404762 |
mid_age | 0.379310 |
senior | 0.521739 |
settled | 0.358209 |
age_piv.plot(kind='bar', legend=False)
<matplotlib.axes._subplots.AxesSubplot at 0x7f4ff094ddd8>
It appears that dissatisfaction is an issue across all age groups, leading to 35% of employees in their 20s to leave as a result of dissatisfaction and increasing with each age group until the level of 52% of seniors leaving as a result of dissatisfaction.
30% of short tenured staff are resigning due to dissatisfaction and 55% and 47% of the Established and Veteran staff are resigning due to dissatisfaction. Indicating that dissatisfaction is a significant factor in both groups. It would be interesting to look at recruitment costs and apportion them across each year of service to decide where to focus a response on. It is arguable that the shorter the tenure the greater the recruitment costs factor in. If it costs £3,000 to recruit and this is spread over 3 years this is £1,000 per year per leaver, if this is apportioned over 10 years that would be £300 per year per leaver. Additionally, the greater the tenure the higher wage and overall employment costs one could assume.
Indicating that actions taken more actively on the short tenured staff rather than the long tenured staff may be the more cost effective approach. Though this would need to be investigated and viewed in conjuction with wider goals and initiatives.
35% of employees in their 20s to leave as a result of dissatisfaction This is increasing with each age group until the level of 52% of those 61 or over, leaving as a result of dissatisfaction.
Additional findings were that 48% of DETE employees were dissatisfied as opposed to 26% of TAFE employees. Indicating that from a resource allocation standpoint additional focus on DETE may be desirable.