Spaces:
Sleeping
Sleeping
Commit
·
e5945e1
1
Parent(s):
82a4feb
test: Increased historical data to 2022
Browse files
app.py
CHANGED
@@ -418,7 +418,7 @@ elif page == "🕵️ Análisis de Cliente":
|
|
418 |
|
419 |
|
420 |
# Filtrar los datos históricos por cliente y por el rango de fechas (2023)
|
421 |
-
fecha_inicio_2023 = pd.to_datetime("
|
422 |
fecha_fin_2023 = pd.to_datetime("2023-12-31")
|
423 |
|
424 |
datos_historicos = historical_data[
|
@@ -432,7 +432,7 @@ elif page == "🕵️ Análisis de Cliente":
|
|
432 |
datos_historicos.rename(columns={'precio_total': 'ventas_historicas'}, inplace=True)
|
433 |
else:
|
434 |
# Si los datos históricos están vacíos, generar fechas de 2023 con ventas_historicas = 0
|
435 |
-
fechas_2023 = pd.date_range(start='
|
436 |
datos_historicos = pd.DataFrame({'fecha_mes': fechas_2023, 'ventas_historicas': [0] * len(fechas_2023)})
|
437 |
|
438 |
# Filtrar los datos de predicciones y ventas reales para 2024
|
|
|
418 |
|
419 |
|
420 |
# Filtrar los datos históricos por cliente y por el rango de fechas (2023)
|
421 |
+
fecha_inicio_2023 = pd.to_datetime("2022-01-01")
|
422 |
fecha_fin_2023 = pd.to_datetime("2023-12-31")
|
423 |
|
424 |
datos_historicos = historical_data[
|
|
|
432 |
datos_historicos.rename(columns={'precio_total': 'ventas_historicas'}, inplace=True)
|
433 |
else:
|
434 |
# Si los datos históricos están vacíos, generar fechas de 2023 con ventas_historicas = 0
|
435 |
+
fechas_2023 = pd.date_range(start='2022-01-01', end='2023-12-31', freq='M')
|
436 |
datos_historicos = pd.DataFrame({'fecha_mes': fechas_2023, 'ventas_historicas': [0] * len(fechas_2023)})
|
437 |
|
438 |
# Filtrar los datos de predicciones y ventas reales para 2024
|