Feat: formatage des numéros de lot en 2digits
This commit is contained in:
parent
bde6a0dfc6
commit
882974cee6
@ -7,7 +7,7 @@ def parse_above_loc(content):
|
||||
row = {}
|
||||
app, loc, *_ = content.split("\n")
|
||||
app_ = app.split(" ")
|
||||
row["lot"] = app_[1]
|
||||
row["lot"] = f"{int(app_[1]):02d}"
|
||||
row["type"] = " ".join(app_[2:])
|
||||
row["locataire"] = loc
|
||||
return pd.Series(row)
|
||||
|
@ -73,7 +73,9 @@ def join(src, dest):
|
||||
}
|
||||
for file in p.glob("*.xlsx"):
|
||||
year, month, immeuble, table = file.stem.split("_")
|
||||
df = pd.read_excel(file).assign(annee=year, mois=month, immeuble=immeuble[:3])
|
||||
df = pd.read_excel(file, dtype={"lot": str}).assign(
|
||||
annee=year, mois=month, immeuble=immeuble[:3]
|
||||
)
|
||||
dfs[table].append(df)
|
||||
for tablename, datas in dfs.items():
|
||||
df = pd.concat(datas)
|
||||
|
Loading…
Reference in New Issue
Block a user