From 90c2d3689b32a7d79eef990aec17aff6cafd0fc2 Mon Sep 17 00:00:00 2001 From: Bertrand Benjamin Date: Wed, 5 Jul 2023 18:13:41 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20I4:=20drop=20row=20with=20""=20on=20locat?= =?UTF-8?q?aire=20ans=20P=C3=A9riode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pdf_oralia/pages/locataire.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pdf_oralia/pages/locataire.py b/pdf_oralia/pages/locataire.py index 9dcddca..f1fa92f 100644 --- a/pdf_oralia/pages/locataire.py +++ b/pdf_oralia/pages/locataire.py @@ -139,8 +139,6 @@ def join_row(table): } ) joined.append(row) - else: - pass return joined @@ -163,4 +161,6 @@ def table2df(tables): numeric_cols = [k for k, v in DF_TYPES.items() if v == float] df[numeric_cols] = df[numeric_cols].replace("", np.nan) + df = df.drop(df[(df["Locataires"] == "") & (df["PĂ©riode"] == "")].index) + return df.astype(DF_TYPES)