Spaces:
Sleeping
Sleeping
cambios
Browse files- analisis.py +2 -3
analisis.py
CHANGED
|
@@ -79,14 +79,13 @@ class AnalizadorDatos:
|
|
| 79 |
|
| 80 |
def generar_graficos(self, columnas_analisis: list) -> dict:
|
| 81 |
"""Genera gráficos para las columnas especificadas"""
|
| 82 |
-
|
| 83 |
-
os.makedirs(ruta_base, exist_ok=True)
|
| 84 |
|
| 85 |
for col in columnas_analisis:
|
| 86 |
if col not in self.df.columns:
|
| 87 |
continue
|
| 88 |
|
| 89 |
-
output_path =
|
| 90 |
|
| 91 |
if pd.api.types.is_numeric_dtype(self.df[col]):
|
| 92 |
path = generar_histograma_r(self.df, col, output_path)
|
|
|
|
| 79 |
|
| 80 |
def generar_graficos(self, columnas_analisis: list) -> dict:
|
| 81 |
"""Genera gráficos para las columnas especificadas"""
|
| 82 |
+
os.makedirs("graficos", exist_ok=True)
|
|
|
|
| 83 |
|
| 84 |
for col in columnas_analisis:
|
| 85 |
if col not in self.df.columns:
|
| 86 |
continue
|
| 87 |
|
| 88 |
+
output_path = f"graficos/{col}.png"
|
| 89 |
|
| 90 |
if pd.api.types.is_numeric_dtype(self.df[col]):
|
| 91 |
path = generar_histograma_r(self.df, col, output_path)
|