Spaces:
Running
Running
Update src/modules/ml_dashboard.py
Browse files
src/modules/ml_dashboard.py
CHANGED
|
@@ -183,6 +183,9 @@ def show_ml_features(client, sheet_name):
|
|
| 183 |
df_2026 = df_prets_master[df_prets_master['Date_Deblocage_dt'].dt.year == 2026].copy()
|
| 184 |
|
| 185 |
if not df_2026.empty:
|
|
|
|
|
|
|
|
|
|
| 186 |
# Calculer le capital mensuel sorti (Montant_Capital)
|
| 187 |
df_2026['Montant_Capital_Num'] = pd.to_numeric(df_2026['Montant_Capital'], errors='coerce').fillna(0)
|
| 188 |
capital_mensuel = df_2026.groupby('Mois')['Montant_Capital_Num'].sum().reset_index()
|
|
|
|
| 183 |
df_2026 = df_prets_master[df_prets_master['Date_Deblocage_dt'].dt.year == 2026].copy()
|
| 184 |
|
| 185 |
if not df_2026.empty:
|
| 186 |
+
# Créer la colonne Mois (numérique)
|
| 187 |
+
df_2026['Mois'] = df_2026['Date_Deblocage_dt'].dt.month
|
| 188 |
+
|
| 189 |
# Calculer le capital mensuel sorti (Montant_Capital)
|
| 190 |
df_2026['Montant_Capital_Num'] = pd.to_numeric(df_2026['Montant_Capital'], errors='coerce').fillna(0)
|
| 191 |
capital_mensuel = df_2026.groupby('Mois')['Montant_Capital_Num'].sum().reset_index()
|