Spaces:
Sleeping
Sleeping
cambios
Browse files78 unmodified lines7980818283848586878889909192935 unmodified lines9910010110210310410510678 unmodified linesdef generar_graficos(self, columnas_analisis: list) -> dict:"""Genera gráficos para las columnas especificadas"""graficos_dir = "/tmp/graficos"os.makedirs(graficos_dir, exist_ok=True)for col in columnas_analisis:if col not in self.df.columns:continueoutput_path = os.path.join(graficos_dir,f"{col}.png")if pd.api.types.is_numeric_dtype(self.df[col]):path = generar_histograma_r(self.df, col, output_path)5 unmodified linesif pd.api.types.is_categorical_dtype(self.df[c])or pd.api.types.is_object_dtype(self.df[c])]if categoricas and len(self.df[categoricas[0]].unique()) <= 10:boxplot_path = os.path.join(graficos_dir, f"{col}_by_{categoricas[0]}.png")path = generar_boxplot_r(self.df, col, categoricas[0], boxplot_path)if path:self.graficos[f"{col}_by_{categoricas[0]}"] = {'tipo': 'boxplot', 'path': path}else:78 unmodified lines798081828384858687888990915 unmodified lines97989910010110210378 unmodified linesdef generar_graficos(self, columnas_analisis: list) -> dict:"""Genera gráficos para las columnas especificadas"""os.makedirs("graficos", exist_ok=True)for col in columnas_analisis:if col not in self.df.columns:continueoutput_path = f"graficos/{col}.png"if pd.api.types.is_numeric_dtype(self.df[col]):path = generar_histograma_r(self.df, col, output_path)5 unmodified linesif pd.api.types.is_categorical_dtype(self.df[c])or pd.api.types.is_object_dtype(self.df[c])]if categoricas and len(self.df[categoricas[0]].unique()) <= 10:path = generar_boxplot_r(self.df, col, categoricas[0], f"graficos/{col}_by_{categoricas[0]}.png")if path:self.graficos[f"{col}_by_{categoricas[0]}"] = {'tipo': 'boxplot', 'path': path}else:
analisis.py+3-6