@@ -203,7 +203,7 @@ def executa(self, conjUnity, diretorio_saida_arg):
203203 if (self .xinf > df_temporal ["estagio" ].min ()):
204204 df_temporal = df_temporal .loc [(df_temporal ["estagio" ] >= self .xinf )]
205205 mapa_temporal [unity ] = df_temporal
206- if (self .csv == "True" ): self .indicadores_temporais . exportar (mapa_temporal [unity ], diretorio_saida_arg , "Temporal " + conjUnity .titulo + unity .titulo + self .estudo )
206+ if (self .csv == "True" ): self .exportar_csv (mapa_temporal [unity ], diretorio_saida_arg , "Temporal " + conjUnity .titulo + unity .titulo + self .estudo )
207207 if (self .boxplot == "True" ):
208208 mapaGO = self .graficos .gera_grafico_boxplot (mapa_temporal , colx = self .eixox )
209209 titulo_padrao = "Boxplot Temporal " + conjUnity .titulo + self .estudo
@@ -228,7 +228,7 @@ def executa(self, conjUnity, diretorio_saida_arg):
228228 mapa_estagio = {}
229229 for unity in conjUnity .listaUnidades :
230230 mapa_estagio [unity ] = mapa_temporal [unity ].loc [mapa_temporal [unity ]["estagio" ] == int (est )]
231- if (self .csv == "True" ): self .indicadores_temporais . exportar (mapa_estagio [unity ], diretorio_saida_arg , mapaEst [est ]+ "_" + unity .titulo + "_" + conjUnity .sintese .sintese + " " + self .estudo )
231+ if (self .csv == "True" ): self .exportar_csv (mapa_estagio [unity ], diretorio_saida_arg , mapaEst [est ]+ "_" + unity .titulo + "_" + conjUnity .sintese .sintese + " " + self .estudo )
232232
233233 mapaGO = self .graficos .gera_grafico_barra (conjUnity , mapa_estagio , mapaEst [est ]+ conjUnity .titulo + " " + self .estudo )
234234 figura = Figura (conjUnity , mapaGO , mapaEst [est ]+ conjUnity .sintese .sintese + " " + self .estudo , self .yinf , self .ysup , self .y2 , self .y2sup , self .y2inf )
@@ -595,4 +595,10 @@ def checkIfNumberOnly(self,s):
595595 float (s ) # Check if string can be converted to a float
596596 return True
597597 except ValueError :
598- return False
598+ return False
599+
600+ def exportar_csv (self , df , diretorio_saida , nome_arquivo , imprimeIndex = False ):
601+ Log .log ().info ("Gerando tabela " + nome_arquivo )
602+ df .to_csv ( os .path .join (diretorio_saida ,
603+ nome_arquivo + ".csv" ),
604+ index = imprimeIndex )
0 commit comments