Commit ab12cc3d authored by João Denis Rodrigues's avatar João Denis Rodrigues
Browse files

Corrigido funcoes curso

parent 9ab15762
......@@ -12,9 +12,9 @@ def average_graduation(df):
def general_failure(df):
not_nan = df.dropna(axis=0)
affect_ira = not_nan[not_nan.SITUACAO.isin(Situation.SITUATION_AFFECT_IRA)]
affect_ira = df[df.SITUACAO.isin(Situation.SITUATION_AFFECT_IRA)]
failures = affect_ira[affect_ira.SITUACAO.isin(Situation.SITUATION_FAIL)]
average = failures.shape[0] / affect_ira.shape[0]
student_courses = affect_ira.groupby(['MATR_ALUNO'], as_index=False)\
......@@ -31,6 +31,6 @@ def general_failure(df):
def general_ira(df):
fixed = df.dropna(axis=0)[df.SITUACAO.isin(Situation.SITUATION_AFFECT_IRA)]
fixed = df[df.SITUACAO.isin(Situation.SITUATION_AFFECT_IRA)]
fixed = fixed[fixed.MEDIA_FINAL <= 100]
return (fixed.MEDIA_FINAL.mean(), fixed.MEDIA_FINAL.std())
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment