-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathresults.py
28 lines (20 loc) · 866 Bytes
/
results.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#Carregando bibliotecas
import pandas as pd
import numpy as np
from modelling.pre_process import pre_processing
from modelling.fit import fit_models
from modelling.run import run_through_samples
from zipfile import ZipFile
import warnings
warnings.filterwarnings("ignore")
#Carregando dados
zip_file = ZipFile('Dados/cenario_1.zip')
dados = {text_file.filename: pd.read_csv(zip_file.open(text_file.filename))
for text_file in zip_file.infolist()
if text_file.filename.endswith('.csv')}
# dados = {text_file.filename: pd.read_csv(zip_file.open(text_file.filename))
# for text_file in zip_file.infolist()
# if text_file.filename in ['cenario3/resultado_112.csv']}
nome = list(dados.keys())[0].split('/')[0] + '.csv'
f = run_through_samples(dados, over_sampling=False, prop=.1)
f.to_csv('Resultados/resultados_' + nome, index=False)