Commit ddba920c authored by Jomaro Rodrigues's avatar Jomaro Rodrigues
Browse files

limpando lixo

parent 2777be38
cache/*
*.json
*.xls
*.csv
script/base/*.xls
script/base/*.csv
import re
import os
import sys
import pandas as pd
import numpy as np
from glob import glob
from json import load as json_load
from script.utils.situations import *
class DataframeHolder:
def __init__(self, dataframe):
self.students = dataframe.groupby('MATR_ALUNO')
......@@ -68,7 +64,6 @@ def fix_dataframes(dataframes):
fix_evasion(merged)
fix_carga(merged)
return merged
......@@ -79,6 +74,7 @@ def clean_history(df):
], axis=1, inplace=True)
df['PERIODO'] = df['PERIODO'].str.split('o').str[0]
def clean_register(df):
df_split = df['PERIODO_INGRESSO'].str.split('/')
df['ANO_INGRESSO'] = df_split.str[0]
......@@ -87,7 +83,6 @@ def clean_register(df):
df['ANO_EVASAO'] = df_split.str[0]
df['SEMESTRE_EVASAO'] = df_split.str[1].str.split('o').str[0]
df.drop(['ID_PESSOA', 'NOME_PESSOA', 'DT_NASCIMENTO', 'NOME_UNIDADE','COD_CURSO', 'PERIODO_INGRESSO', 'PERIODO_EVASAO'],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