{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"source": [
"## Resignation in Australian Civil Service\n",
"Employee retention has many benefits. It can help with efficiency, customer satisfaction, and workplace diversity. Understanding why people choose to resign is key in building a stable group.\n",
" This paper looks at the Australian Department of Education, Training, and Employment (DETE) as well as the Technical and Further Education (TAFE) institute in Queensland, Australia. It compares rates of resignation to the length of employment and to the age of employee."
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"# import necessary libraries and set display options\n",
"import pandas as pd\n",
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
"%matplotlib inline\n",
"pd.options.display.float_format = '{:20,.4f}'.format\n",
"pd.set_option('display.max_rows', None)\n",
"pd.set_option('display.max_columns', None)\n",
"pd.set_option('display.width', 3000)\n",
"pd.set_option('display.colheader_justify', 'center')\n",
"pd.set_option('display.precision', 3)\n",
"\n",
"# open files\n",
"dete_survey = pd.read_csv(\"dete_survey.csv\", na_values=\"Not Stated\")\n",
"tafe_survey = pd.read_csv(\"tafe_survey.csv\")"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"scrolled": false
},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"
\n",
" \n",
"
\n",
"
\n",
"
ID
\n",
"
SeparationType
\n",
"
Cease Date
\n",
"
DETE Start Date
\n",
"
Role Start Date
\n",
"
Position
\n",
"
Classification
\n",
"
Region
\n",
"
Business Unit
\n",
"
Employment Status
\n",
"
Career move to public sector
\n",
"
Career move to private sector
\n",
"
Interpersonal conflicts
\n",
"
Job dissatisfaction
\n",
"
Dissatisfaction with the department
\n",
"
Physical work environment
\n",
"
Lack of recognition
\n",
"
Lack of job security
\n",
"
Work location
\n",
"
Employment conditions
\n",
"
Maternity/family
\n",
"
Relocation
\n",
"
Study/Travel
\n",
"
Ill Health
\n",
"
Traumatic incident
\n",
"
Work life balance
\n",
"
Workload
\n",
"
None of the above
\n",
"
Professional Development
\n",
"
Opportunities for promotion
\n",
"
Staff morale
\n",
"
Workplace issue
\n",
"
Physical environment
\n",
"
Worklife balance
\n",
"
Stress and pressure support
\n",
"
Performance of supervisor
\n",
"
Peer support
\n",
"
Initiative
\n",
"
Skills
\n",
"
Coach
\n",
"
Career Aspirations
\n",
"
Feedback
\n",
"
Further PD
\n",
"
Communication
\n",
"
My say
\n",
"
Information
\n",
"
Kept informed
\n",
"
Wellness programs
\n",
"
Health & Safety
\n",
"
Gender
\n",
"
Age
\n",
"
Aboriginal
\n",
"
Torres Strait
\n",
"
South Sea
\n",
"
Disability
\n",
"
NESB
\n",
"
\n",
" \n",
" \n",
"
\n",
"
0
\n",
"
1
\n",
"
Ill Health Retirement
\n",
"
08/2012
\n",
"
1,984.0000
\n",
"
2,004.0000
\n",
"
Public Servant
\n",
"
A01-A04
\n",
"
Central Office
\n",
"
Corporate Strategy and Peformance
\n",
"
Permanent Full-time
\n",
"
True
\n",
"
False
\n",
"
False
\n",
"
True
\n",
"
False
\n",
"
False
\n",
"
True
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
True
\n",
"
A
\n",
"
A
\n",
"
N
\n",
"
N
\n",
"
N
\n",
"
A
\n",
"
A
\n",
"
A
\n",
"
A
\n",
"
N
\n",
"
N
\n",
"
N
\n",
"
A
\n",
"
A
\n",
"
A
\n",
"
N
\n",
"
A
\n",
"
A
\n",
"
N
\n",
"
N
\n",
"
N
\n",
"
Male
\n",
"
56-60
\n",
"
NaN
\n",
"
NaN
\n",
"
NaN
\n",
"
NaN
\n",
"
Yes
\n",
"
\n",
"
\n",
"
1
\n",
"
2
\n",
"
Voluntary Early Retirement (VER)
\n",
"
08/2012
\n",
"
NaN
\n",
"
NaN
\n",
"
Public Servant
\n",
"
AO5-AO7
\n",
"
Central Office
\n",
"
Corporate Strategy and Peformance
\n",
"
Permanent Full-time
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
A
\n",
"
A
\n",
"
N
\n",
"
N
\n",
"
N
\n",
"
N
\n",
"
A
\n",
"
A
\n",
"
A
\n",
"
N
\n",
"
N
\n",
"
N
\n",
"
A
\n",
"
A
\n",
"
A
\n",
"
N
\n",
"
A
\n",
"
A
\n",
"
N
\n",
"
N
\n",
"
N
\n",
"
Male
\n",
"
56-60
\n",
"
NaN
\n",
"
NaN
\n",
"
NaN
\n",
"
NaN
\n",
"
NaN
\n",
"
\n",
"
\n",
"
2
\n",
"
3
\n",
"
Voluntary Early Retirement (VER)
\n",
"
05/2012
\n",
"
2,011.0000
\n",
"
2,011.0000
\n",
"
Schools Officer
\n",
"
NaN
\n",
"
Central Office
\n",
"
Education Queensland
\n",
"
Permanent Full-time
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
True
\n",
"
N
\n",
"
N
\n",
"
N
\n",
"
N
\n",
"
N
\n",
"
N
\n",
"
N
\n",
"
N
\n",
"
N
\n",
"
N
\n",
"
N
\n",
"
N
\n",
"
N
\n",
"
N
\n",
"
N
\n",
"
A
\n",
"
A
\n",
"
N
\n",
"
N
\n",
"
N
\n",
"
N
\n",
"
Male
\n",
"
61 or older
\n",
"
NaN
\n",
"
NaN
\n",
"
NaN
\n",
"
NaN
\n",
"
NaN
\n",
"
\n",
"
\n",
"
3
\n",
"
4
\n",
"
Resignation-Other reasons
\n",
"
05/2012
\n",
"
2,005.0000
\n",
"
2,006.0000
\n",
"
Teacher
\n",
"
Primary
\n",
"
Central Queensland
\n",
"
NaN
\n",
"
Permanent Full-time
\n",
"
False
\n",
"
True
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
A
\n",
"
N
\n",
"
N
\n",
"
N
\n",
"
A
\n",
"
A
\n",
"
N
\n",
"
N
\n",
"
A
\n",
"
A
\n",
"
A
\n",
"
A
\n",
"
A
\n",
"
A
\n",
"
A
\n",
"
A
\n",
"
A
\n",
"
A
\n",
"
A
\n",
"
N
\n",
"
A
\n",
"
Female
\n",
"
36-40
\n",
"
NaN
\n",
"
NaN
\n",
"
NaN
\n",
"
NaN
\n",
"
NaN
\n",
"
\n",
"
\n",
"
4
\n",
"
5
\n",
"
Age Retirement
\n",
"
05/2012
\n",
"
1,970.0000
\n",
"
1,989.0000
\n",
"
Head of Curriculum/Head of Special Education
\n",
"
NaN
\n",
"
South East
\n",
"
NaN
\n",
"
Permanent Full-time
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
True
\n",
"
False
\n",
"
False
\n",
"
A
\n",
"
A
\n",
"
N
\n",
"
N
\n",
"
D
\n",
"
D
\n",
"
N
\n",
"
A
\n",
"
A
\n",
"
A
\n",
"
A
\n",
"
A
\n",
"
A
\n",
"
SA
\n",
"
SA
\n",
"
D
\n",
"
D
\n",
"
A
\n",
"
N
\n",
"
A
\n",
"
M
\n",
"
Female
\n",
"
61 or older
\n",
"
NaN
\n",
"
NaN
\n",
"
NaN
\n",
"
NaN
\n",
"
NaN
\n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" ID SeparationType Cease Date DETE Start Date Role Start Date Position Classification Region Business Unit Employment Status Career move to public sector Career move to private sector Interpersonal conflicts Job dissatisfaction Dissatisfaction with the department Physical work environment Lack of recognition Lack of job security Work location Employment conditions Maternity/family Relocation Study/Travel Ill Health Traumatic incident Work life balance Workload None of the above Professional Development Opportunities for promotion Staff morale Workplace issue Physical environment Worklife balance Stress and pressure support Performance of supervisor Peer support Initiative Skills Coach Career Aspirations Feedback Further PD Communication My say Information Kept informed Wellness programs Health & Safety Gender Age Aboriginal Torres Strait South Sea Disability NESB\n",
"0 1 Ill Health Retirement 08/2012 1,984.0000 2,004.0000 Public Servant A01-A04 Central Office Corporate Strategy and Peformance Permanent Full-time True False False True False False True False False False False False False False False False False True A A N N N A A A A N N N A A A N A A N N N Male 56-60 NaN NaN NaN NaN Yes\n",
"1 2 Voluntary Early Retirement (VER) 08/2012 NaN NaN Public Servant AO5-AO7 Central Office Corporate Strategy and Peformance Permanent Full-time False False False False False False False False False False False False False False False False False False A A N N N N A A A N N N A A A N A A N N N Male 56-60 NaN NaN NaN NaN NaN\n",
"2 3 Voluntary Early Retirement (VER) 05/2012 2,011.0000 2,011.0000 Schools Officer NaN Central Office Education Queensland Permanent Full-time False False False False False False False False False False False False False False False False False True N N N N N N N N N N N N N N N A A N N N N Male 61 or older NaN NaN NaN NaN NaN\n",
"3 4 Resignation-Other reasons 05/2012 2,005.0000 2,006.0000 Teacher Primary Central Queensland NaN Permanent Full-time False True False False False False False False False False False False False False False False False False A N N N A A N N A A A A A A A A A A A N A Female 36-40 NaN NaN NaN NaN NaN\n",
"4 5 Age Retirement 05/2012 1,970.0000 1,989.0000 Head of Curriculum/Head of Special Education NaN South East NaN Permanent Full-time False False False False False False False False False False False False False False False True False False A A N N D D N A A A A A A SA SA D D A N A M Female 61 or older NaN NaN NaN NaN NaN"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"RangeIndex: 822 entries, 0 to 821\n",
"Data columns (total 56 columns):\n",
" # Column Non-Null Count Dtype \n",
"--- ------ -------------- ----- \n",
" 0 ID 822 non-null int64 \n",
" 1 SeparationType 822 non-null object \n",
" 2 Cease Date 788 non-null object \n",
" 3 DETE Start Date 749 non-null float64\n",
" 4 Role Start Date 724 non-null float64\n",
" 5 Position 817 non-null object \n",
" 6 Classification 455 non-null object \n",
" 7 Region 717 non-null object \n",
" 8 Business Unit 126 non-null object \n",
" 9 Employment Status 817 non-null object \n",
" 10 Career move to public sector 822 non-null bool \n",
" 11 Career move to private sector 822 non-null bool \n",
" 12 Interpersonal conflicts 822 non-null bool \n",
" 13 Job dissatisfaction 822 non-null bool \n",
" 14 Dissatisfaction with the department 822 non-null bool \n",
" 15 Physical work environment 822 non-null bool \n",
" 16 Lack of recognition 822 non-null bool \n",
" 17 Lack of job security 822 non-null bool \n",
" 18 Work location 822 non-null bool \n",
" 19 Employment conditions 822 non-null bool \n",
" 20 Maternity/family 822 non-null bool \n",
" 21 Relocation 822 non-null bool \n",
" 22 Study/Travel 822 non-null bool \n",
" 23 Ill Health 822 non-null bool \n",
" 24 Traumatic incident 822 non-null bool \n",
" 25 Work life balance 822 non-null bool \n",
" 26 Workload 822 non-null bool \n",
" 27 None of the above 822 non-null bool \n",
" 28 Professional Development 808 non-null object \n",
" 29 Opportunities for promotion 735 non-null object \n",
" 30 Staff morale 816 non-null object \n",
" 31 Workplace issue 788 non-null object \n",
" 32 Physical environment 817 non-null object \n",
" 33 Worklife balance 815 non-null object \n",
" 34 Stress and pressure support 810 non-null object \n",
" 35 Performance of supervisor 813 non-null object \n",
" 36 Peer support 812 non-null object \n",
" 37 Initiative 813 non-null object \n",
" 38 Skills 811 non-null object \n",
" 39 Coach 767 non-null object \n",
" 40 Career Aspirations 746 non-null object \n",
" 41 Feedback 792 non-null object \n",
" 42 Further PD 768 non-null object \n",
" 43 Communication 814 non-null object \n",
" 44 My say 812 non-null object \n",
" 45 Information 816 non-null object \n",
" 46 Kept informed 813 non-null object \n",
" 47 Wellness programs 766 non-null object \n",
" 48 Health & Safety 793 non-null object \n",
" 49 Gender 798 non-null object \n",
" 50 Age 811 non-null object \n",
" 51 Aboriginal 16 non-null object \n",
" 52 Torres Strait 3 non-null object \n",
" 53 South Sea 7 non-null object \n",
" 54 Disability 23 non-null object \n",
" 55 NESB 32 non-null object \n",
"dtypes: bool(18), float64(2), int64(1), object(35)\n",
"memory usage: 258.6+ KB\n"
]
},
{
"data": {
"text/plain": [
"None"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# dete_survey\n",
"display(dete_survey.head())\n",
"display(dete_survey.info())"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"scrolled": false
},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"
\n",
" \n",
"
\n",
"
\n",
"
Record ID
\n",
"
Institute
\n",
"
WorkArea
\n",
"
CESSATION YEAR
\n",
"
Reason for ceasing employment
\n",
"
Contributing Factors. Career Move - Public Sector
\n",
"
Contributing Factors. Career Move - Private Sector
\n",
"
Contributing Factors. Career Move - Self-employment
\n",
"
Contributing Factors. Ill Health
\n",
"
Contributing Factors. Maternity/Family
\n",
"
Contributing Factors. Dissatisfaction
\n",
"
Contributing Factors. Job Dissatisfaction
\n",
"
Contributing Factors. Interpersonal Conflict
\n",
"
Contributing Factors. Study
\n",
"
Contributing Factors. Travel
\n",
"
Contributing Factors. Other
\n",
"
Contributing Factors. NONE
\n",
"
Main Factor. Which of these was the main factor for leaving?
\n",
"
InstituteViews. Topic:1. I feel the senior leadership had a clear vision and direction
\n",
"
InstituteViews. Topic:2. I was given access to skills training to help me do my job better
\n",
"
InstituteViews. Topic:3. I was given adequate opportunities for personal development
\n",
"
InstituteViews. Topic:4. I was given adequate opportunities for promotion within %Institute]Q25LBL%
\n",
"
InstituteViews. Topic:5. I felt the salary for the job was right for the responsibilities I had
\n",
"
InstituteViews. Topic:6. The organisation recognised when staff did good work
\n",
"
InstituteViews. Topic:7. Management was generally supportive of me
\n",
"
InstituteViews. Topic:8. Management was generally supportive of my team
\n",
"
InstituteViews. Topic:9. I was kept informed of the changes in the organisation which would affect me
\n",
"
InstituteViews. Topic:10. Staff morale was positive within the Institute
\n",
"
InstituteViews. Topic:11. If I had a workplace issue it was dealt with quickly
\n",
"
InstituteViews. Topic:12. If I had a workplace issue it was dealt with efficiently
\n",
"
InstituteViews. Topic:13. If I had a workplace issue it was dealt with discreetly
\n",
"
WorkUnitViews. Topic:14. I was satisfied with the quality of the management and supervision within my work unit
\n",
"
WorkUnitViews. Topic:15. I worked well with my colleagues
\n",
"
WorkUnitViews. Topic:16. My job was challenging and interesting
\n",
"
WorkUnitViews. Topic:17. I was encouraged to use my initiative in the course of my work
\n",
"
WorkUnitViews. Topic:18. I had sufficient contact with other people in my job
\n",
"
WorkUnitViews. Topic:19. I was given adequate support and co-operation by my peers to enable me to do my job
\n",
"
WorkUnitViews. Topic:20. I was able to use the full range of my skills in my job
\n",
"
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]
\n",
"
WorkUnitViews. Topic:22. I was able to use the full range of my knowledge in my job
\n",
"
WorkUnitViews. Topic:23. My job provided sufficient variety
\n",
"
WorkUnitViews. Topic:24. I was able to cope with the level of stress and pressure in my job
\n",
"
WorkUnitViews. Topic:25. My job allowed me to balance the demands of work and family to my satisfaction
\n",
"
WorkUnitViews. Topic:26. My supervisor gave me adequate personal recognition and feedback on my performance
\n",
"
WorkUnitViews. Topic:27. My working environment was satisfactory e.g. sufficient space, good lighting, suitable seating and working area
\n",
"
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
\n",
"
WorkUnitViews. Topic:29. There was adequate communication between staff in my unit
\n",
"
WorkUnitViews. Topic:30. Staff morale was positive within my work unit
\n",
"
Induction. Did you undertake Workplace Induction?
\n",
"
InductionInfo. Topic:Did you undertake a Corporate Induction?
\n",
"
InductionInfo. Topic:Did you undertake a Institute Induction?
\n",
"
InductionInfo. Topic: Did you undertake Team Induction?
\n",
"
InductionInfo. Face to Face Topic:Did you undertake a Corporate Induction; Category:How it was conducted?
\n",
"
InductionInfo. On-line Topic:Did you undertake a Corporate Induction; Category:How it was conducted?
\n",
"
InductionInfo. Induction Manual Topic:Did you undertake a Corporate Induction?
\n",
"
InductionInfo. Face to Face Topic:Did you undertake a Institute Induction?
\n",
"
InductionInfo. On-line Topic:Did you undertake a Institute Induction?
\n",
"
InductionInfo. Induction Manual Topic:Did you undertake a Institute Induction?
\n",
"
InductionInfo. Face to Face Topic: Did you undertake Team Induction; Category?
\n",
"
InductionInfo. On-line Topic: Did you undertake Team Induction?process you undertook and how it was conducted.]
\n",
"
InductionInfo. Induction Manual Topic: Did you undertake Team Induction?
\n",
"
Workplace. Topic:Did you and your Manager develop a Performance and Professional Development Plan (PPDP)?
\n",
"
Workplace. Topic:Does your workplace promote a work culture free from all forms of unlawful discrimination?
\n",
"
Workplace. Topic:Does your workplace promote and practice the principles of employment equity?
\n",
"
Workplace. Topic:Does your workplace value the diversity of its employees?
\n",
"
Workplace. Topic:Would you recommend the Institute as an employer to others?
\n",
"
Gender. What is your Gender?
\n",
"
CurrentAge. Current Age
\n",
"
Employment Type. Employment Type
\n",
"
Classification. Classification
\n",
"
LengthofServiceOverall. Overall Length of Service at Institute (in years)
\n",
"
LengthofServiceCurrent. Length of Service at current workplace (in years)
\n",
"
\n",
" \n",
" \n",
"
\n",
"
0
\n",
"
634,133,009,996,093,952.0000
\n",
"
Southern Queensland Institute of TAFE
\n",
"
Non-Delivery (corporate)
\n",
"
2,010.0000
\n",
"
Contract Expired
\n",
"
NaN
\n",
"
NaN
\n",
"
NaN
\n",
"
NaN
\n",
"
NaN
\n",
"
NaN
\n",
"
NaN
\n",
"
NaN
\n",
"
NaN
\n",
"
NaN
\n",
"
NaN
\n",
"
NaN
\n",
"
NaN
\n",
"
Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Neutral
\n",
"
Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Strongly Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Neutral
\n",
"
Agree
\n",
"
Agree
\n",
"
Yes
\n",
"
Yes
\n",
"
Yes
\n",
"
Yes
\n",
"
Face to Face
\n",
"
-
\n",
"
-
\n",
"
Face to Face
\n",
"
-
\n",
"
-
\n",
"
Face to Face
\n",
"
-
\n",
"
-
\n",
"
Yes
\n",
"
Yes
\n",
"
Yes
\n",
"
Yes
\n",
"
Yes
\n",
"
Female
\n",
"
26 30
\n",
"
Temporary Full-time
\n",
"
Administration (AO)
\n",
"
1-2
\n",
"
1-2
\n",
"
\n",
"
\n",
"
1
\n",
"
634,133,654,064,530,944.0000
\n",
"
Mount Isa Institute of TAFE
\n",
"
Non-Delivery (corporate)
\n",
"
2,010.0000
\n",
"
Retirement
\n",
"
-
\n",
"
-
\n",
"
-
\n",
"
-
\n",
"
-
\n",
"
-
\n",
"
-
\n",
"
-
\n",
"
-
\n",
"
Travel
\n",
"
-
\n",
"
-
\n",
"
NaN
\n",
"
Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Strongly Agree
\n",
"
Strongly Agree
\n",
"
Agree
\n",
"
Strongly Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Disagree
\n",
"
Strongly Agree
\n",
"
Strongly Agree
\n",
"
Strongly Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Strongly Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Strongly Agree
\n",
"
Agree
\n",
"
Strongly Agree
\n",
"
Strongly Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Strongly Agree
\n",
"
No
\n",
"
NaN
\n",
"
NaN
\n",
"
NaN
\n",
"
NaN
\n",
"
NaN
\n",
"
NaN
\n",
"
NaN
\n",
"
NaN
\n",
"
NaN
\n",
"
NaN
\n",
"
NaN
\n",
"
NaN
\n",
"
Yes
\n",
"
Yes
\n",
"
Yes
\n",
"
Yes
\n",
"
Yes
\n",
"
NaN
\n",
"
NaN
\n",
"
NaN
\n",
"
NaN
\n",
"
NaN
\n",
"
NaN
\n",
"
\n",
"
\n",
"
2
\n",
"
634,138,845,606,562,944.0000
\n",
"
Mount Isa Institute of TAFE
\n",
"
Delivery (teaching)
\n",
"
2,010.0000
\n",
"
Retirement
\n",
"
-
\n",
"
-
\n",
"
-
\n",
"
-
\n",
"
-
\n",
"
-
\n",
"
-
\n",
"
-
\n",
"
-
\n",
"
-
\n",
"
-
\n",
"
NONE
\n",
"
NaN
\n",
"
Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Strongly Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Neutral
\n",
"
Neutral
\n",
"
Strongly Agree
\n",
"
Strongly Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
No
\n",
"
NaN
\n",
"
NaN
\n",
"
NaN
\n",
"
NaN
\n",
"
NaN
\n",
"
NaN
\n",
"
NaN
\n",
"
NaN
\n",
"
NaN
\n",
"
NaN
\n",
"
NaN
\n",
"
NaN
\n",
"
Yes
\n",
"
Yes
\n",
"
Yes
\n",
"
Yes
\n",
"
Yes
\n",
"
NaN
\n",
"
NaN
\n",
"
NaN
\n",
"
NaN
\n",
"
NaN
\n",
"
NaN
\n",
"
\n",
"
\n",
"
3
\n",
"
634,139,903,350,000,000.0000
\n",
"
Mount Isa Institute of TAFE
\n",
"
Non-Delivery (corporate)
\n",
"
2,010.0000
\n",
"
Resignation
\n",
"
-
\n",
"
-
\n",
"
-
\n",
"
-
\n",
"
-
\n",
"
-
\n",
"
-
\n",
"
-
\n",
"
-
\n",
"
Travel
\n",
"
-
\n",
"
-
\n",
"
NaN
\n",
"
Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Agree
\n",
"
Strongly Agree
\n",
"
Strongly Agree
\n",
"
Strongly Agree
\n",
"
Strongly Agree
\n",
"
Strongly Agree
\n",
"
Strongly Agree
\n",
"
Strongly Agree
\n",
"
Strongly Agree
\n",
"
Strongly Agree
\n",
"
Strongly Agree
\n",
"
Strongly Agree
\n",
"
Strongly Agree
\n",
"
Strongly Agree
\n",
"
Strongly Agree
\n",
"
Strongly Agree
\n",
"
Strongly Agree
\n",
"
Strongly Agree
\n",
"
Yes
\n",
"
No
\n",
"
Yes
\n",
"
Yes
\n",
"
-
\n",
"
-
\n",
"
-
\n",
"
NaN
\n",
"
-
\n",
"
-
\n",
"
-
\n",
"
-
\n",
"
-
\n",
"
Yes
\n",
"
Yes
\n",
"
Yes
\n",
"
Yes
\n",
"
Yes
\n",
"
NaN
\n",
"
NaN
\n",
"
NaN
\n",
"
NaN
\n",
"
NaN
\n",
"
NaN
\n",
"
\n",
"
\n",
"
4
\n",
"
634,146,578,511,788,032.0000
\n",
"
Southern Queensland Institute of TAFE
\n",
"
Delivery (teaching)
\n",
"
2,010.0000
\n",
"
Resignation
\n",
"
-
\n",
"
Career Move - Private Sector
\n",
"
-
\n",
"
-
\n",
"
-
\n",
"
-
\n",
"
-
\n",
"
-
\n",
"
-
\n",
"
-
\n",
"
-
\n",
"
-
\n",
"
NaN
\n",
"
Agree
\n",
"
Agree
\n",
"
Strongly Agree
\n",
"
Agree
\n",
"
Strongly Agree
\n",
"
Strongly Agree
\n",
"
Strongly Agree
\n",
"
Strongly Agree
\n",
"
Agree
\n",
"
Strongly Agree
\n",
"
Strongly Agree
\n",
"
Agree
\n",
"
Strongly Agree
\n",
"
Strongly Agree
\n",
"
Strongly Agree
\n",
"
Strongly Agree
\n",
"
Strongly Agree
\n",
"
Strongly Agree
\n",
"
Strongly Agree
\n",
"
Strongly Agree
\n",
"
Strongly Agree
\n",
"
Strongly Agree
\n",
"
Strongly Agree
\n",
"
Strongly Agree
\n",
"
Strongly Agree
\n",
"
Strongly Agree
\n",
"
Strongly Agree
\n",
"
Strongly Agree
\n",
"
Strongly Agree
\n",
"
Strongly Agree
\n",
"
Yes
\n",
"
Yes
\n",
"
Yes
\n",
"
Yes
\n",
"
-
\n",
"
-
\n",
"
Induction Manual
\n",
"
Face to Face
\n",
"
-
\n",
"
-
\n",
"
Face to Face
\n",
"
-
\n",
"
-
\n",
"
Yes
\n",
"
Yes
\n",
"
Yes
\n",
"
Yes
\n",
"
Yes
\n",
"
Male
\n",
"
41 45
\n",
"
Permanent Full-time
\n",
"
Teacher (including LVT)
\n",
"
3-4
\n",
"
3-4
\n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" 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 Main Factor. Which of these was the main factor for leaving? InstituteViews. Topic:1. I feel the senior leadership had a clear vision and direction InstituteViews. Topic:2. I was given access to skills training to help me do my job better InstituteViews. Topic:3. I was given adequate opportunities for personal development InstituteViews. Topic:4. I was given adequate opportunities for promotion within %Institute]Q25LBL% InstituteViews. Topic:5. I felt the salary for the job was right for the responsibilities I had InstituteViews. Topic:6. The organisation recognised when staff did good work InstituteViews. Topic:7. Management was generally supportive of me InstituteViews. Topic:8. Management was generally supportive of my team InstituteViews. Topic:9. I was kept informed of the changes in the organisation which would affect me InstituteViews. Topic:10. Staff morale was positive within the Institute InstituteViews. Topic:11. If I had a workplace issue it was dealt with quickly InstituteViews. Topic:12. If I had a workplace issue it was dealt with efficiently InstituteViews. Topic:13. If I had a workplace issue it was dealt with discreetly WorkUnitViews. Topic:14. I was satisfied with the quality of the management and supervision within my work unit WorkUnitViews. Topic:15. I worked well with my colleagues WorkUnitViews. Topic:16. My job was challenging and interesting WorkUnitViews. Topic:17. I was encouraged to use my initiative in the course of my work WorkUnitViews. Topic:18. I had sufficient contact with other people in my job WorkUnitViews. Topic:19. I was given adequate support and co-operation by my peers to enable me to do my job WorkUnitViews. Topic:20. I was able to use the full range of my skills in my job 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] WorkUnitViews. Topic:22. I was able to use the full range of my knowledge in my job WorkUnitViews. Topic:23. My job provided sufficient variety WorkUnitViews. Topic:24. I was able to cope with the level of stress and pressure in my job WorkUnitViews. Topic:25. My job allowed me to balance the demands of work and family to my satisfaction WorkUnitViews. Topic:26. My supervisor gave me adequate personal recognition and feedback on my performance \\\n",
"0 634,133,009,996,093,952.0000 Southern Queensland Institute of TAFE Non-Delivery (corporate) 2,010.0000 Contract Expired NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN Agree Agree Agree Neutral Agree Agree Agree Agree Agree Agree Agree Agree Agree Agree Agree Agree Strongly Agree Agree Agree Agree Agree Agree Agree Agree Agree Agree \n",
"1 634,133,654,064,530,944.0000 Mount Isa Institute of TAFE Non-Delivery (corporate) 2,010.0000 Retirement - - - - - - - - - Travel - - NaN Agree Agree Agree Agree Agree Strongly Agree Strongly Agree Agree Strongly Agree Agree Agree Agree Disagree Strongly Agree Strongly Agree Strongly Agree Agree Agree Agree Strongly Agree Agree Agree Agree Strongly Agree Agree Strongly Agree \n",
"2 634,138,845,606,562,944.0000 Mount Isa Institute of TAFE Delivery (teaching) 2,010.0000 Retirement - - - - - - - - - - - NONE NaN Agree Agree Agree Agree Agree Agree Strongly Agree Agree Agree Agree Agree Neutral Neutral Strongly Agree Strongly Agree Agree Agree Agree Agree Agree Agree Agree Agree Agree Agree Agree \n",
"3 634,139,903,350,000,000.0000 Mount Isa Institute of TAFE Non-Delivery (corporate) 2,010.0000 Resignation - - - - - - - - - Travel - - NaN Agree Agree Agree Agree Agree Agree Agree Agree Agree Agree Agree Agree Agree Strongly Agree Strongly Agree Strongly Agree Strongly Agree Strongly Agree Strongly Agree Strongly Agree Strongly Agree Strongly Agree Strongly Agree Strongly Agree Strongly Agree Strongly Agree \n",
"4 634,146,578,511,788,032.0000 Southern Queensland Institute of TAFE Delivery (teaching) 2,010.0000 Resignation - Career Move - Private Sector - - - - - - - - - - NaN Agree Agree Strongly Agree Agree Strongly Agree Strongly Agree Strongly Agree Strongly Agree Agree Strongly Agree Strongly Agree Agree Strongly Agree Strongly Agree Strongly Agree Strongly Agree Strongly Agree Strongly Agree Strongly Agree Strongly Agree Strongly Agree Strongly Agree Strongly Agree Strongly Agree Strongly Agree Strongly Agree \n",
"\n",
" WorkUnitViews. Topic:27. My working environment was satisfactory e.g. sufficient space, good lighting, suitable seating and working area 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 WorkUnitViews. Topic:29. There was adequate communication between staff in my unit WorkUnitViews. Topic:30. Staff morale was positive within my work unit Induction. Did you undertake Workplace Induction? InductionInfo. Topic:Did you undertake a Corporate Induction? InductionInfo. Topic:Did you undertake a Institute Induction? InductionInfo. Topic: Did you undertake Team Induction? InductionInfo. Face to Face Topic:Did you undertake a Corporate Induction; Category:How it was conducted? InductionInfo. On-line Topic:Did you undertake a Corporate Induction; Category:How it was conducted? InductionInfo. Induction Manual Topic:Did you undertake a Corporate Induction? InductionInfo. Face to Face Topic:Did you undertake a Institute Induction? InductionInfo. On-line Topic:Did you undertake a Institute Induction? InductionInfo. Induction Manual Topic:Did you undertake a Institute Induction? InductionInfo. Face to Face Topic: Did you undertake Team Induction; Category? InductionInfo. On-line Topic: Did you undertake Team Induction?process you undertook and how it was conducted.] InductionInfo. Induction Manual Topic: Did you undertake Team Induction? Workplace. Topic:Did you and your Manager develop a Performance and Professional Development Plan (PPDP)? 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) \n",
"0 Agree Neutral Agree Agree Yes Yes Yes Yes Face to Face - - Face to Face - - Face to Face - - Yes Yes Yes Yes Yes Female 26 30 Temporary Full-time Administration (AO) 1-2 1-2 \n",
"1 Strongly Agree Agree Agree Strongly Agree No NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN Yes Yes Yes Yes Yes NaN NaN NaN NaN NaN NaN \n",
"2 Agree Agree Agree Agree No NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN Yes Yes Yes Yes Yes NaN NaN NaN NaN NaN NaN \n",
"3 Strongly Agree Strongly Agree Strongly Agree Strongly Agree Yes No Yes Yes - - - NaN - - - - - Yes Yes Yes Yes Yes NaN NaN NaN NaN NaN NaN \n",
"4 Strongly Agree Strongly Agree Strongly Agree Strongly Agree Yes Yes Yes Yes - - Induction Manual Face to Face - - Face to Face - - Yes Yes Yes Yes Yes Male 41 45 Permanent Full-time Teacher (including LVT) 3-4 3-4 "
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"RangeIndex: 702 entries, 0 to 701\n",
"Data columns (total 72 columns):\n",
" # Column Non-Null Count Dtype \n",
"--- ------ -------------- ----- \n",
" 0 Record ID 702 non-null float64\n",
" 1 Institute 702 non-null object \n",
" 2 WorkArea 702 non-null object \n",
" 3 CESSATION YEAR 695 non-null float64\n",
" 4 Reason for ceasing employment 701 non-null object \n",
" 5 Contributing Factors. Career Move - Public Sector 437 non-null object \n",
" 6 Contributing Factors. Career Move - Private Sector 437 non-null object \n",
" 7 Contributing Factors. Career Move - Self-employment 437 non-null object \n",
" 8 Contributing Factors. Ill Health 437 non-null object \n",
" 9 Contributing Factors. Maternity/Family 437 non-null object \n",
" 10 Contributing Factors. Dissatisfaction 437 non-null object \n",
" 11 Contributing Factors. Job Dissatisfaction 437 non-null object \n",
" 12 Contributing Factors. Interpersonal Conflict 437 non-null object \n",
" 13 Contributing Factors. Study 437 non-null object \n",
" 14 Contributing Factors. Travel 437 non-null object \n",
" 15 Contributing Factors. Other 437 non-null object \n",
" 16 Contributing Factors. NONE 437 non-null object \n",
" 17 Main Factor. Which of these was the main factor for leaving? 113 non-null object \n",
" 18 InstituteViews. Topic:1. I feel the senior leadership had a clear vision and direction 608 non-null object \n",
" 19 InstituteViews. Topic:2. I was given access to skills training to help me do my job better 613 non-null object \n",
" 20 InstituteViews. Topic:3. I was given adequate opportunities for personal development 610 non-null object \n",
" 21 InstituteViews. Topic:4. I was given adequate opportunities for promotion within %Institute]Q25LBL% 608 non-null object \n",
" 22 InstituteViews. Topic:5. I felt the salary for the job was right for the responsibilities I had 615 non-null object \n",
" 23 InstituteViews. Topic:6. The organisation recognised when staff did good work 607 non-null object \n",
" 24 InstituteViews. Topic:7. Management was generally supportive of me 614 non-null object \n",
" 25 InstituteViews. Topic:8. Management was generally supportive of my team 608 non-null object \n",
" 26 InstituteViews. Topic:9. I was kept informed of the changes in the organisation which would affect me 610 non-null object \n",
" 27 InstituteViews. Topic:10. Staff morale was positive within the Institute 602 non-null object \n",
" 28 InstituteViews. Topic:11. If I had a workplace issue it was dealt with quickly 601 non-null object \n",
" 29 InstituteViews. Topic:12. If I had a workplace issue it was dealt with efficiently 597 non-null object \n",
" 30 InstituteViews. Topic:13. If I had a workplace issue it was dealt with discreetly 601 non-null object \n",
" 31 WorkUnitViews. Topic:14. I was satisfied with the quality of the management and supervision within my work unit 609 non-null object \n",
" 32 WorkUnitViews. Topic:15. I worked well with my colleagues 605 non-null object \n",
" 33 WorkUnitViews. Topic:16. My job was challenging and interesting 607 non-null object \n",
" 34 WorkUnitViews. Topic:17. I was encouraged to use my initiative in the course of my work 610 non-null object \n",
" 35 WorkUnitViews. Topic:18. I had sufficient contact with other people in my job 613 non-null object \n",
" 36 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 \n",
" 37 WorkUnitViews. Topic:20. I was able to use the full range of my skills in my job 609 non-null object \n",
" 38 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 \n",
" 39 WorkUnitViews. Topic:22. I was able to use the full range of my knowledge in my job 608 non-null object \n",
" 40 WorkUnitViews. Topic:23. My job provided sufficient variety 611 non-null object \n",
" 41 WorkUnitViews. Topic:24. I was able to cope with the level of stress and pressure in my job 610 non-null object \n",
" 42 WorkUnitViews. Topic:25. My job allowed me to balance the demands of work and family to my satisfaction 611 non-null object \n",
" 43 WorkUnitViews. Topic:26. My supervisor gave me adequate personal recognition and feedback on my performance 606 non-null object \n",
" 44 WorkUnitViews. Topic:27. My working environment was satisfactory e.g. sufficient space, good lighting, suitable seating and working area 610 non-null object \n",
" 45 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 \n",
" 46 WorkUnitViews. Topic:29. There was adequate communication between staff in my unit 603 non-null object \n",
" 47 WorkUnitViews. Topic:30. Staff morale was positive within my work unit 606 non-null object \n",
" 48 Induction. Did you undertake Workplace Induction? 619 non-null object \n",
" 49 InductionInfo. Topic:Did you undertake a Corporate Induction? 432 non-null object \n",
" 50 InductionInfo. Topic:Did you undertake a Institute Induction? 483 non-null object \n",
" 51 InductionInfo. Topic: Did you undertake Team Induction? 440 non-null object \n",
" 52 InductionInfo. Face to Face Topic:Did you undertake a Corporate Induction; Category:How it was conducted? 555 non-null object \n",
" 53 InductionInfo. On-line Topic:Did you undertake a Corporate Induction; Category:How it was conducted? 555 non-null object \n",
" 54 InductionInfo. Induction Manual Topic:Did you undertake a Corporate Induction? 555 non-null object \n",
" 55 InductionInfo. Face to Face Topic:Did you undertake a Institute Induction? 530 non-null object \n",
" 56 InductionInfo. On-line Topic:Did you undertake a Institute Induction? 555 non-null object \n",
" 57 InductionInfo. Induction Manual Topic:Did you undertake a Institute Induction? 553 non-null object \n",
" 58 InductionInfo. Face to Face Topic: Did you undertake Team Induction; Category? 555 non-null object \n",
" 59 InductionInfo. On-line Topic: Did you undertake Team Induction?process you undertook and how it was conducted.] 555 non-null object \n",
" 60 InductionInfo. Induction Manual Topic: Did you undertake Team Induction? 555 non-null object \n",
" 61 Workplace. Topic:Did you and your Manager develop a Performance and Professional Development Plan (PPDP)? 608 non-null object \n",
" 62 Workplace. Topic:Does your workplace promote a work culture free from all forms of unlawful discrimination? 594 non-null object \n",
" 63 Workplace. Topic:Does your workplace promote and practice the principles of employment equity? 587 non-null object \n",
" 64 Workplace. Topic:Does your workplace value the diversity of its employees? 586 non-null object \n",
" 65 Workplace. Topic:Would you recommend the Institute as an employer to others? 581 non-null object \n",
" 66 Gender. What is your Gender? 596 non-null object \n",
" 67 CurrentAge. Current Age 596 non-null object \n",
" 68 Employment Type. Employment Type 596 non-null object \n",
" 69 Classification. Classification 596 non-null object \n",
" 70 LengthofServiceOverall. Overall Length of Service at Institute (in years) 596 non-null object \n",
" 71 LengthofServiceCurrent. Length of Service at current workplace (in years) 596 non-null object \n",
"dtypes: float64(2), object(70)\n",
"memory usage: 395.0+ KB\n"
]
},
{
"data": {
"text/plain": [
"None"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# tafe_survey\n",
"display(tafe_survey.head())\n",
"display(tafe_survey.info())"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Initial Look & Header Standardization\n",
"There are many columns in both files that are not needed to answer the research questions. Making the header style more uniform allows for code that is easier to read."
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"['id',\n",
" 'separationtype',\n",
" 'cease_date',\n",
" 'dete_start_date',\n",
" 'role_start_date',\n",
" 'position',\n",
" 'classification',\n",
" 'region',\n",
" 'business_unit',\n",
" 'employment_status',\n",
" 'career_move_to_public_sector',\n",
" 'career_move_to_private_sector',\n",
" 'interpersonal_conflicts',\n",
" 'job_dissatisfaction',\n",
" 'dissatisfaction_with_the_department',\n",
" 'physical_work_environment',\n",
" 'lack_of_recognition',\n",
" 'lack_of_job_security',\n",
" 'work_location',\n",
" 'employment_conditions',\n",
" 'maternity/family',\n",
" 'relocation',\n",
" 'study/travel',\n",
" 'ill_health',\n",
" 'traumatic_incident',\n",
" 'work_life_balance',\n",
" 'workload',\n",
" 'none_of_the_above',\n",
" 'gender',\n",
" 'age',\n",
" 'aboriginal',\n",
" 'torres_strait',\n",
" 'south_sea',\n",
" 'disability',\n",
" 'nesb']"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"['id',\n",
" 'institute',\n",
" 'workarea',\n",
" 'cease_date',\n",
" 'separationtype',\n",
" 'contributing_factors._career_move_-_public_sector_',\n",
" 'contributing_factors._career_move_-_private_sector_',\n",
" 'contributing_factors._career_move_-_self-employment',\n",
" 'contributing_factors._ill_health',\n",
" 'contributing_factors._maternity/family',\n",
" 'contributing_factors._dissatisfaction',\n",
" 'contributing_factors._job_dissatisfaction',\n",
" 'contributing_factors._interpersonal_conflict',\n",
" 'contributing_factors._study',\n",
" 'contributing_factors._travel',\n",
" 'contributing_factors._other',\n",
" 'contributing_factors._none',\n",
" 'gender',\n",
" 'age',\n",
" 'employment_status',\n",
" 'position',\n",
" 'institute_service',\n",
" 'role_service']"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# drop unnecessary columns\n",
"dete_survey_updated = dete_survey.drop(dete_survey.columns[28:49], axis=1)\n",
"tafe_survey_updated = tafe_survey.drop(tafe_survey.columns[17:66], axis=1)\n",
"\n",
"# modify & standardize header\n",
"map = {'Record ID': 'id', 'CESSATION YEAR': 'cease_date', 'Reason for ceasing employment': 'separationtype',\n",
" 'Gender. What is your Gender?': 'gender', 'CurrentAge. Current Age': 'age',\n",
" 'Employment Type. Employment Type': 'employment_status', 'Classification. Classification': 'position',\n",
" 'LengthofServiceOverall. Overall Length of Service at Institute (in years)': 'institute_service',\n",
" 'LengthofServiceCurrent. Length of Service at current workplace (in years)': 'role_service'}\n",
"tafe_survey_updated = tafe_survey_updated.rename(columns=map)\n",
"dete_survey_updated.columns = dete_survey_updated.columns.str.lower().str.replace(' ', '_').str.strip()\n",
"tafe_survey_updated.columns = tafe_survey_updated.columns.str.lower().str.replace(' ', '_').str.strip()\n",
"\n",
"display(dete_survey_updated.columns.to_list())\n",
"display(tafe_survey_updated.columns.to_list())"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Filtering Year Columns\n",
"The code cell below shows the responses in the ```separationtype``` column. This study is focused only on resignations. The DETE survey has multiple resignation codes. All of these rows, plus the corresponding rows in the tafe survey, will be copied to new data frames. This reduces 822 DETE rows and 702 TAFE rows to 262 and 340 respectively. from The relevant values will be cleaned and the rows checked to see if they are corrupted by any outlier values."
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"scrolled": true
},
"outputs": [
{
"data": {
"text/plain": [
"Age Retirement 285\n",
"Resignation-Other reasons 150\n",
"Resignation-Other employer 91\n",
"Resignation-Move overseas/interstate 70\n",
"Voluntary Early Retirement (VER) 67\n",
"Ill Health Retirement 61\n",
"Other 49\n",
"Contract Expired 34\n",
"Termination 15\n",
"Name: separationtype, dtype: int64"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"Resignation 340\n",
"Contract Expired 127\n",
"Retrenchment/ Redundancy 104\n",
"Retirement 82\n",
"Transfer 25\n",
"Termination 23\n",
"NaN 1\n",
"Name: separationtype, dtype: int64"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# values coded into speparationtype column\n",
"display(dete_survey_updated[\"separationtype\"].value_counts(dropna=False))\n",
"display(tafe_survey_updated[\"separationtype\"].value_counts(dropna=False))"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"scrolled": false
},
"outputs": [
{
"data": {
"text/plain": [
"Resignation-Other reasons 150\n",
"Resignation-Other employer 91\n",
"Resignation-Move overseas/interstate 70\n",
"Name: separationtype, dtype: int64"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"Resignation 340\n",
"Name: separationtype, dtype: int64"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# copy separationtype rows using regex and vectorized string methods\n",
"pattern = r\"Resignation\"\n",
"dete_resignations = dete_survey_updated[dete_survey_updated[\"separationtype\"].str.contains(pattern, regex=True)].copy()\n",
"tafe_resignations = tafe_survey_updated[tafe_survey_updated[\"separationtype\"].str.contains(pattern, regex=True, na=False)].copy()\n",
"\n",
"display(dete_resignations[\"separationtype\"].value_counts(dropna=False))\n",
"display(tafe_resignations[\"separationtype\"].value_counts(dropna=False))"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"scrolled": false
},
"outputs": [],
"source": [
"# dete_start_date > 1940\n",
"dete_resignations = dete_resignations[1940 < dete_resignations[\"dete_start_date\"]]\n",
"\n",
"# dete_start_date < role_start_date < cease_date\n",
"dete_resignations = dete_resignations[1940 < dete_resignations[\"role_start_date\"]]\n",
"dete_resignations = dete_resignations[dete_resignations[\"role_start_date\"] < 2021]\n",
"\n",
"# cease_date < current date\n",
"pattern = r\"[0-9][0-9]/\"\n",
"dete_resignations[\"cease_date\"] = dete_resignations[\"cease_date\"].str.replace(pattern, \"\", regex=True).astype(float)\n",
"dete_resignations = dete_resignations[dete_resignations[\"cease_date\"] < 2021]"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"scrolled": false
},
"outputs": [
{
"data": {
"text/plain": [
""
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAX0AAAD5CAYAAADLL+UrAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/MnkTPAAAACXBIWXMAAAsTAAALEwEAmpwYAAAedUlEQVR4nO3df3hV1Z3v8feXH4ZfYm0RLgVv4/XS9oTYMte09d5STQYHvW2n0GfUNmW0lowYnk46FdsJNf3ljHkw02e4Vhyh0OCvYdIfahG0/kDnBJoOtaWCgJx2tFPtYHMVr1AJSCTxe/84K+kh5pBzkpCdk/15PU+e7LP23mt/91nnfLPO2iv7mLsjIiLxMCrqAEREZOgo6YuIxIiSvohIjCjpi4jEiJK+iEiMjIk6gL5MmTLFi4uLow7jlDly5AgTJ06MOgzpB7VdYRvp7ffLX/7yFXc/q2f5sE/6xcXF7NixI+owTpnm5mbKy8ujDkP6QW1X2EZ6+5nZC72Va3hHRCRGlPRFRGJESV9EJEaU9EVEYkRJX0QkRpT0RURiRElfRCRGlPRFRGJk2P9zlohIvsxsUOoZid83op6+iIw47t7nz7tqH+xzm5FISV9EJEaU9EVEYkRj+qeQxhUL22C0n9ru1DjvrvMGXMfpCTjvruUDqmPPZ/cMOI6hpqR/CuXyhi9e/hDP3/yxIYhG8tVX+6ntonM4dfOAn/uB3mWzePlDAzp+VDS8IyISI0r6IiIxouEdESlIJxteeaHh44NyjHfVPph13Rnjxw7KMYaakr6IFJw+x/Nv7vt62kj/5qxsNLwjIhIjSvoiIjGi4R2Jpfff+Bh/eP34gOsZ6LS9M8aP5elvzB9wHCK56jPpm9nZwN3AfwHeBNa6+7fN7O3A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FmiAAAAAElFTkSuQmCC\n",
"text/plain": [
"
"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"dete_resignations.boxplot(column=[\"dete_start_date\", \"role_start_date\", \"cease_date\"])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Filtering Year Columns Continued\n",
"The DETE dataframe had one row in the `role_start_date` column with a year entry of 200. This row was excluded. There are a number of rows with NaN, but they can stay in because Pandas vectorized methods accommodate them. The first question is to assess connections between resignation and newer employees. The TAFE dataframe includes a employment duration column. A similar column needs to created for the DETE information. "
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Less than 1 year 73\n",
"1-2 64\n",
"3-4 63\n",
"5-6 33\n",
"11-20 26\n",
"7-10 21\n",
"More than 20 years 10\n",
"Name: institute_service, dtype: int64"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"count 290\n",
"unique 7\n",
"top Less than 1 year\n",
"freq 73\n",
"Name: institute_service, dtype: object"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# display TAFE institute service\n",
"display(tafe_resignations[\"institute_service\"].value_counts())\n",
"display(tafe_resignations[\"institute_service\"].describe())"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"scrolled": true
},
"outputs": [
{
"data": {
"text/plain": [
"11-20 52\n",
"More than 20 years 41\n",
"7-10 39\n",
"5-6 38\n",
"3-4 36\n",
"1-2 36\n",
"Less than 1 year 20\n",
"Name: institute_service, dtype: int64"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"count 262\n",
"unique 7\n",
"top 11-20\n",
"freq 52\n",
"Name: institute_service, dtype: object"
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# create and display DETE institute service column\n",
"# the dictionary reassigns discrete numbers into a more useable range\n",
"dete_resignations[\"institute_service\"] = dete_resignations[\"cease_date\"] - dete_resignations[\"dete_start_date\"]\n",
"di = {0.0: \"Less than 1 year\", 1.0: \"1-2\", 2.0:\"1-2\", 3.0:\"3-4\", 4.0:\"3-4\", 5.0:\"5-6\", 6.0:\"5-6\", 7.0:\"7-10\",\n",
" 8.0:\"7-10\", 9.0:\"7-10\", 10.0:\"7-10\", 11.0:\"11-20\", 12.0:\"11-20\", 13.0:\"11-20\", 14.0:\"11-20\", 15.0:\"11-20\",\n",
" 16.0:\"11-20\", 17.0:\"11-20\", 18.0:\"11-20\", 19.0:\"11-20\", 20.0:\"11-20\", 21:\"More than 20 years\",\n",
" 22:\"More than 20 years\", 23:\"More than 20 years\", 24:\"More than 20 years\", 25:\"More than 20 years\",\n",
" 26:\"More than 20 years\", 27:\"More than 20 years\", 28:\"More than 20 years\", 29:\"More than 20 years\",\n",
" 30:\"More than 20 years\", 31:\"More than 20 years\", 32:\"More than 20 years\", 33:\"More than 20 years\",\n",
" 34:\"More than 20 years\", 35:\"More than 20 years\", 36:\"More than 20 years\", 38:\"More than 20 years\",\n",
" 39:\"More than 20 years\", 41:\"More than 20 years\", 42:\"More than 20 years\", 49:\"More than 20 years\"}\n",
"dete_resignations['institute_service'] = dete_resignations['institute_service'].map(di)\n",
"\n",
"display(dete_resignations[\"institute_service\"].value_counts())\n",
"dete_resignations[\"institute_service\"].describe()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Aggregating Dissatisfaction\n",
"Each dataset has multiple resignation columns that could be considered as dissatisfaction, as opposed to other reasons such as `ill_health`, `study`, or `maternity`. These columns will be aggregated into a single `dissatisfied` column for each dataset. Values will be coded to True or False. At this time, the NaN values are being coded as False."
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {
"scrolled": false
},
"outputs": [
{
"data": {
"text/plain": [
"- 277\n",
"Contributing Factors. Dissatisfaction 55\n",
"NaN 8\n",
"Name: contributing_factors._dissatisfaction, dtype: int64"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"- 270\n",
"Job Dissatisfaction 62\n",
"NaN 8\n",
"Name: contributing_factors._job_dissatisfaction, dtype: int64"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# inspect TAFE resignation values\n",
"display(tafe_resignations[\"contributing_factors._dissatisfaction\"].value_counts(dropna=False))\n",
"display(tafe_resignations[\"contributing_factors._job_dissatisfaction\"].value_counts(dropna=False))"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [],
"source": [
"# convert TAFE resignation values to boolean values\n",
"# vectorized methods are amazing\n",
"def boolean_bummer(element):\n",
" if pd.isnull(element):\n",
" return np.nan\n",
" elif element == \"-\":\n",
" return False\n",
" else:\n",
" return True\n",
"\n",
"tafe_resig_factors = [\"contributing_factors._dissatisfaction\", \"contributing_factors._job_dissatisfaction\"] \n",
"tafe_resignations[tafe_resig_factors] = tafe_resignations[tafe_resig_factors].applymap(boolean_bummer)"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {
"scrolled": false
},
"outputs": [
{
"data": {
"text/plain": [
"False 277\n",
"True 55\n",
"NaN 8\n",
"Name: contributing_factors._dissatisfaction, dtype: int64"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"False 270\n",
"True 62\n",
"NaN 8\n",
"Name: contributing_factors._job_dissatisfaction, dtype: int64"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# inspect TAFE resignation values after converting to boolean\n",
"display(tafe_resignations[\"contributing_factors._dissatisfaction\"].value_counts(dropna=False))\n",
"display(tafe_resignations[\"contributing_factors._job_dissatisfaction\"].value_counts(dropna=False))"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [],
"source": [
"# create new TAFE column `dissatisfied` using .any()\n",
"# trying to preserve NaN as NaN does not work, gets converted to True or False\n",
"tafe_resignations[\"dissatisfied\"] = tafe_resignations[tafe_resig_factors].any(axis=1, skipna=True)"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"
\n",
" \n",
"
\n",
"
\n",
"
contributing_factors._dissatisfaction
\n",
"
contributing_factors._job_dissatisfaction
\n",
"
dissatisfied
\n",
"
\n",
" \n",
" \n",
"
\n",
"
39
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
\n",
"
\n",
"
40
\n",
"
True
\n",
"
False
\n",
"
True
\n",
"
\n",
"
\n",
"
41
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
\n",
"
\n",
"
42
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
\n",
"
\n",
"
45
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
\n",
"
\n",
"
46
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
\n",
"
\n",
"
47
\n",
"
True
\n",
"
False
\n",
"
True
\n",
"
\n",
"
\n",
"
49
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
\n",
"
\n",
"
51
\n",
"
NaN
\n",
"
NaN
\n",
"
False
\n",
"
\n",
"
\n",
"
52
\n",
"
False
\n",
"
True
\n",
"
True
\n",
"
\n",
"
\n",
"
53
\n",
"
False
\n",
"
False
\n",
"
False
\n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" contributing_factors._dissatisfaction contributing_factors._job_dissatisfaction dissatisfied\n",
"39 False False False \n",
"40 True False True \n",
"41 False False False \n",
"42 False False False \n",
"45 False False False \n",
"46 False False False \n",
"47 True False True \n",
"49 False False False \n",
"51 NaN NaN False \n",
"52 False True True \n",
"53 False False False "
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# inspect all three columns for logical errors\n",
"tafe_resignations = tafe_resignations.reindex()\n",
"display(tafe_resignations.loc[39:53,[\"contributing_factors._dissatisfaction\", \"contributing_factors._job_dissatisfaction\",\n",
" \"dissatisfied\"]])"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"True 132\n",
"False 130\n",
"Name: dissatisfied, dtype: int64"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# create new DETE column `dissatisfied` using .any()\n",
"dete_resig_factors = [\"job_dissatisfaction\", \"dissatisfaction_with_the_department\", \"physical_work_environment\",\n",
" \"lack_of_recognition\", \"lack_of_job_security\", \"work_location\", \"employment_conditions\",\n",
" \"work_life_balance\", \"workload\"]\n",
"\n",
"dete_resignations[\"dissatisfied\"] = dete_resignations[dete_resig_factors].any(axis=1, skipna=True)\n",
"display(dete_resignations[\"dissatisfied\"].value_counts())"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Combine Datasets\n",
"Both datasets are ready to combine. Vertical concatenation will work best for the purpose of this study. Only the relevant columns will be used. They will be used to create new two new columns, one of age groups, and the other length of employment groups."
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"