From 60b59d2d036e883c2f9f3f59a8cddfcd1c19e363 Mon Sep 17 00:00:00 2001 From: Colin Maudry Date: Tue, 30 Jun 2026 17:34:27 +0200 Subject: [PATCH] =?UTF-8?q?Pr=C3=A9cision=20sur=20les=20SIRET=20inconnu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/db.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/db.py b/src/db.py index 0152d6d..11f464c 100644 --- a/src/db.py +++ b/src/db.py @@ -55,9 +55,18 @@ def _load_source_frame() -> pl.DataFrame: ) for col in ["acheteur_nom", "titulaire_nom"]: + id_col = col.replace("_nom", "_id") lff = lff.with_columns( pl.when(pl.col(col).is_null()) - .then(pl.lit("[Identifiant non reconnu dans la base INSEE]")) + .then( + pl.concat_str( + [ + pl.lit("[Inconnu de l'INSEE ("), + pl.col(id_col).cast(pl.String), + pl.lit(")]"), + ] + ) + ) .otherwise(pl.col(col)) .name.keep() )