Feat: keep only 3first letters in immeuble

This commit is contained in:
Bertrand Benjamin 2022-10-10 22:10:55 +02:00
parent 640ed76160
commit fb3ba00d9b

View File

@ -73,7 +73,7 @@ def join(folder, 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)
df = pd.read_excel(file).assign(annee=year, mois=month, immeuble=immeuble[:3])
dfs[table].append(df)
for tablename, datas in dfs.items():
df = pd.concat(datas)