Add and correct pies
This commit is contained in:
parent
70496744c9
commit
b607d64e3a
|
@ -188,16 +188,6 @@ class Classe(object):
|
|||
self.exo_df = exo_df
|
||||
self.eval_df = eval_df
|
||||
|
||||
@property
|
||||
def desription(self):
|
||||
""" Desribe on marks """
|
||||
# TODO: not working... |ven. mars 31 18:48:17 EAT 2017
|
||||
try:
|
||||
self._description
|
||||
except AttributeError:
|
||||
self._description = self.eval_df["Mark"].describe()
|
||||
return self._description
|
||||
|
||||
@property
|
||||
def marks_tabular(self):
|
||||
""" Latex tabular with marks of students"""
|
||||
|
@ -240,7 +230,7 @@ class Classe(object):
|
|||
return lines[1:]
|
||||
exercice_sep = lines_4_heatmap(pv.columns)
|
||||
|
||||
pv.columns = [f"{i[1]} {i[2]} {i[3]:.15}" for i in pv.columns.get_values()]
|
||||
pv.columns = [f"{i[3]:.15} {i[1]} {i[2]}" for i in pv.columns.get_values()]
|
||||
|
||||
self._level_heatmap = sns.heatmap(pv.T)
|
||||
|
||||
|
@ -251,6 +241,25 @@ class Classe(object):
|
|||
|
||||
return self._level_heatmap
|
||||
|
||||
@property
|
||||
def pies_eff_pts_on_competence(self):
|
||||
""" Pie charts on competence with repartition of evaluated times and attributed points """
|
||||
return pie_pivot_table(self.quest_df[["Competence", "Bareme", "Exercice", "Question", "Commentaire"]].drop_duplicates(),
|
||||
index = "Competence",
|
||||
#columns = "Level",
|
||||
values = "Bareme",
|
||||
aggfunc=[len,np.sum],
|
||||
fill_value=0)
|
||||
|
||||
@property
|
||||
def pies_eff_pts_on_domaine(self):
|
||||
""" Pie charts on domaine with repartition of evaluated times and attributed points """
|
||||
return pie_pivot_table(self.quest_df[["Domaine", "Bareme", "Exercice", "Question", "Commentaire"]].drop_duplicates(),
|
||||
index = "Domaine",
|
||||
#columns = "Level",
|
||||
values = "Bareme",
|
||||
aggfunc=[len,np.sum],
|
||||
fill_value=0)
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -157,7 +157,7 @@ class Classe(object):
|
|||
@property
|
||||
def pies_eff_pts_on_competence(self):
|
||||
""" Pie charts on competence with repartition of evaluated times and attributed points """
|
||||
return pie_pivot_table(self.quest_df,
|
||||
return pie_pivot_table(self.quest_df[["Competence", "Bareme", "Exercice", "Question", "Commentaire"]].drop_duplicates(),
|
||||
index = "Competence",
|
||||
#columns = "Level",
|
||||
values = "Bareme",
|
||||
|
@ -167,7 +167,7 @@ class Classe(object):
|
|||
@property
|
||||
def pies_eff_pts_on_domaine(self):
|
||||
""" Pie charts on domaine with repartition of evaluated times and attributed points """
|
||||
return pie_pivot_table(self.quest_df,
|
||||
return pie_pivot_table(self.quest_df[["Domaine", "Bareme", "Exercice", "Question", "Commentaire"]].drop_duplicates(),
|
||||
index = "Domaine",
|
||||
#columns = "Level",
|
||||
values = "Bareme",
|
||||
|
|
Loading…
Reference in New Issue