Feat: rename first column of charges
This commit is contained in:
parent
1153931b7f
commit
3e2a23fb86
@ -22,6 +22,7 @@ def extract_charge(table):
|
||||
.replace("", np.nan)
|
||||
.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)
|
||||
@ -50,14 +51,18 @@ def extract_charge(table):
|
||||
}
|
||||
)
|
||||
|
||||
df.columns.values[0] = "Fournisseur"
|
||||
return df
|
||||
|
||||
|
||||
def extract_remise_com(table):
|
||||
"""Extract "remise commercial" from first page"""
|
||||
df = pd.DataFrame(table[1:], columns=table[0]).replace("", np.nan)
|
||||
return df[
|
||||
df = df[
|
||||
df["RECAPITULATIF DES OPERATIONS"].str.contains(
|
||||
"Remise commerciale gérance", case=False, na=False
|
||||
)
|
||||
]
|
||||
|
||||
df.columns.values[0] = "Fournisseur"
|
||||
return df
|
||||
|
Loading…
Reference in New Issue
Block a user