GMARTINEZMILLA commited on
Commit
08f4cfc
·
1 Parent(s): d9d4d22

feat: updated website

Browse files
Files changed (1) hide show
  1. app.py +9 -0
app.py CHANGED
@@ -370,6 +370,14 @@ elif page == "Customer Analysis":
370
 
371
  # Ensure the 'fecha_mes' column in results is also in datetime format if it's being used for comparisons
372
  results['fecha_mes'] = pd.to_datetime(results['fecha_mes'], errors='coerce')
 
 
 
 
 
 
 
 
373
  fecha_inicio = pd.to_datetime(fecha_inicio)
374
 
375
  # Filter historical data for the customer over the last 12 months
@@ -378,6 +386,7 @@ elif page == "Customer Analysis":
378
  (historical_data['fecha_mes'] >= fecha_inicio) &
379
  (historical_data['fecha_mes'] < fecha_corte)
380
  ].groupby('fecha_mes')['precio_total'].sum().reset_index()
 
381
 
382
  # Rename 'precio_total' column to 'ventas_historicas'
383
  datos_historicos.rename(columns={'precio_total': 'ventas_historicas'}, inplace=True)
 
370
 
371
  # Ensure the 'fecha_mes' column in results is also in datetime format if it's being used for comparisons
372
  results['fecha_mes'] = pd.to_datetime(results['fecha_mes'], errors='coerce')
373
+
374
+ st.subheader("Datos históricos completos")
375
+ st.write(historical_data.head())
376
+
377
+ st.subheader("Resultados completos con predicciones")
378
+ st.write(results.head())
379
+
380
+
381
  fecha_inicio = pd.to_datetime(fecha_inicio)
382
 
383
  # Filter historical data for the customer over the last 12 months
 
386
  (historical_data['fecha_mes'] >= fecha_inicio) &
387
  (historical_data['fecha_mes'] < fecha_corte)
388
  ].groupby('fecha_mes')['precio_total'].sum().reset_index()
389
+ st.write(datos_historicos)
390
 
391
  # Rename 'precio_total' column to 'ventas_historicas'
392
  datos_historicos.rename(columns={'precio_total': 'ventas_historicas'}, inplace=True)