From 771000c68e7a6d10b4a5c8bd05bde1bbb5aab2f1 Mon Sep 17 00:00:00 2001 From: Legton <legton0@gmail.com> Date: Mon, 18 Sep 2017 15:17:49 +0000 Subject: [PATCH] analise da taxa de evasao --- script/analysis/degree_analysis.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/script/analysis/degree_analysis.py b/script/analysis/degree_analysis.py index 9e74941..3016a9e 100644 --- a/script/analysis/degree_analysis.py +++ b/script/analysis/degree_analysis.py @@ -34,3 +34,9 @@ def general_ira(df): fixed = df[df.SITUACAO.isin(Situation.SITUATION_AFFECT_IRA)] fixed = fixed[fixed.MEDIA_FINAL <= 100] return (fixed.MEDIA_FINAL.mean(), fixed.MEDIA_FINAL.std()) + +def total_evasion_rate(df): + total_student = df['MATR_ALUNO'].shape[0] + total_evasion = df.loc[(df['FORMA_EVASAO']!=('Sem evasão')) & (df['FORMA_EVASAO']!=('Formatura')) & (df['FORMA_EVASAO']!=('Reintegração'))].shape[0] + + return total_evasion / total_student -- GitLab