From cf807f44598054115ab662b67aa55e652b130204 Mon Sep 17 00:00:00 2001
From: Bruno Meyer <buba.meyer_@hotmail.com>
Date: Wed, 1 Nov 2017 19:12:05 -0200
Subject: [PATCH] listagem

---
 script/analysis/student_analysis.py | 13 +++++++++++++
 script/build_cache.py               |  8 +++-----
 2 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/script/analysis/student_analysis.py b/script/analysis/student_analysis.py
index 959863e..ac23042 100644
--- a/script/analysis/student_analysis.py
+++ b/script/analysis/student_analysis.py
@@ -5,6 +5,19 @@ from utils.situations import *
 ANO_ATUAL = 2017
 SEMESTRE_ATUAL = 2
 
+def listagem_evasao(df):
+	#~ print(df["FORMA_EVASAO"].drop_duplicates())
+	#~ print(df)
+	#~ print(Situation.SITUATION_AFFECT_IRA)
+	#~ print(df)
+	aux = df[df.FORMA_EVASAO != 1]
+	print(aux)
+	#~ print(aux.where(aux.SITUACAO != 1)["SITUACAO"])
+	#~ print(df[df.SITUACAO.isin(Situation.SITUATION_AFFECT_IRA)])
+	#~ print(df.where(df["SITUACAO"] in Situation.SITUATION_AFFECT_IRA))
+	#~ aux = df.drop_duplicates(['MATR_ALUNO'], keep='last')
+	#~ print(aux["FORMA_EVASAO"].drop_duplicates())
+
 def average_ira(d):
     temp = d.dropna(subset=['MEDIA_FINAL'])
     temp = temp[temp['MEDIA_FINAL'] <= 100]
diff --git a/script/build_cache.py b/script/build_cache.py
index ef77277..553b94c 100644
--- a/script/build_cache.py
+++ b/script/build_cache.py
@@ -22,8 +22,7 @@ def build_cache(dataframe):
     path += "/curso"
     build_path(path)
 
-    generate_student_data(path, dataframe)
-    generate_degree_data(path, dataframe)
+#    generate_degree_data(path, dataframe)
     generate_student_data(path,dataframe)
 #    generate_student_list(path)
 #    generate_admission_data(path)
@@ -35,8 +34,6 @@ def generate_degree_data(path, dataframe):
     average_graduation(dataframe)
     general_failure(dataframe)
     general_ira(dataframe)
-    total_evasion_rate(dataframe)
-    average_graduation_time(dataframe)
     pass
 
 def generate_student_data(path,dataframe):
@@ -50,7 +47,8 @@ def generate_student_data(path,dataframe):
     #~ ira_semestra(dataframe)
     #~ periodo_pretendido(dataframe)
     #~ print(periodo_real(dataframe))
-    print(posicao_turmaIngresso_semestral(dataframe))
+    #~ print(posicao_turmaIngresso_semestral(dataframe))
+    print(listagem_evasao(dataframe))
     pass
 
 def generate_student_list(path):
-- 
GitLab