From 35a20c33077628ffafd0efec33a1ed2c1a6da1cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9o=20BARAS=20=28IUT1=20Grenoble=29?= Date: Tue, 27 Feb 2024 16:30:00 +0100 Subject: [PATCH] Coquille --- app/pe/pe_jury.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/app/pe/pe_jury.py b/app/pe/pe_jury.py index 7b42204af..3ddf2fdb7 100644 --- a/app/pe/pe_jury.py +++ b/app/pe/pe_jury.py @@ -608,7 +608,7 @@ class JuryPE(object): # Les données des étudiants etuds = [etud for etudid, etud in self.etudiants.etudiants_diplomes.items()] - df = pe_tabletags.df_administratif(etuds, aggregat="", cohorte="") + df = pe_tabletags.df_administratif(etuds, aggregat="Administratif", cohorte="") if type_moy == pe_moytag.CODE_MOY_UE: aggregats = pe_rcs.TOUS_LES_SEMESTRES @@ -769,5 +769,14 @@ def convert_colonnes_to_multiindex(df): multiindex""" colonnes = list(df.columns) colonnes = [tuple(col.split("|")) for col in colonnes] - df.columns = pd.MultiIndex.from_tuples(colonnes) + # modifie le nom du semestre par sa descr + colonnes_verbose = [] + for col in colonnes: + if col[0] in pe_rcs.TYPES_RCS: + col_verbose = [pe_rcs.TYPES_RCS[col[0]]] + list(col[1:]) + col_verbose = tuple(col_verbose) + else: + col_verbose = col + colonnes_verbose.append(col) + df.columns = pd.MultiIndex.from_tuples(colonnes_verbose) return df