Feat: charge dropna on Débits AND Crédits
This commit is contained in:
parent
45f2e3bf83
commit
a06720b93c
@ -20,12 +20,15 @@ def extract_charge(table):
|
||||
df = (
|
||||
pd.DataFrame(table[1:], columns=table[0])
|
||||
.replace("", np.nan)
|
||||
.dropna(subset=["Débits"])
|
||||
.dropna(subset=["Débits", "Crédits"], how="all")
|
||||
)
|
||||
drop_index = df[
|
||||
df["RECAPITULATIF DES OPERATIONS"].str.contains("TOTAUX", case=False)
|
||||
| df["RECAPITULATIF DES OPERATIONS"].str.contains("Solde créditeur", case=False)
|
||||
| df["RECAPITULATIF DES OPERATIONS"].str.contains("Solde débiteur", case=False)
|
||||
| df["RECAPITULATIF DES OPERATIONS"].str.contains(
|
||||
"Total des reglements locataires", case=False
|
||||
)
|
||||
].index
|
||||
df.drop(drop_index, inplace=True)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user