Commit 560919af authored by Odair M.'s avatar Odair M.

Fix #183: resolve problemas na nova planilha de ibm, os problemas foram...

 Fix #183: resolve problemas na nova planilha de ibm, os problemas foram na codificcao dos valores da coluna forma evasao, NaN em ano e periodo evasao e carga horaria com valores Nan
parent 31402ea6
......@@ -90,6 +90,8 @@ def clean_register(df):
df_split = df['PERIODO_EVASAO'].str.split('/')
df['ANO_EVASAO'] = df_split.str[0]
df['SEMESTRE_EVASAO'] = df_split.str[1].str.split('o').str[0]
df['ANO_EVASAO'].fillna(0, inplace=True)
df['SEMESTRE_EVASAO'].fillna(0, inplace=True)
......@@ -124,13 +126,14 @@ def fix_admission(df):
def fix_carga(df):
df["CH_TOTAL"] = df["CH_TEORICA"]+df["CH_PRATICA"]
#df["CH_TOTAL"] = df["CH_TEORICA"]+df["CH_PRATICA"]
def fix_evasion(df):
df.rename(columns={'FORMA_EVASAO': 'FORMA_EVASAO2'}, inplace=True)
df.FORMA_EVASAO2 = df.FORMA_EVASAO2.str.replace(u"ă","ã")
df['FORMA_EVASAO'] = df.FORMA_EVASAO2.apply(get_situation(EvasionForm.EVASION_FORM,
df.drop(['FORMA_EVASAO2'], axis=1, inplace=True)
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