Feat: formating
This commit is contained in:
parent
1d234ea5fc
commit
6ed55c07d4
|
@ -45,15 +45,46 @@ class CSVLoader(Loader):
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def exam_columns(self):
|
def exam_columns(self):
|
||||||
return pd.Index(['name', 'date', 'term', 'origin', 'tribe', 'id'])
|
return pd.Index(["name", "date", "term", "origin", "tribe", "id"])
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def question_columns(self):
|
def question_columns(self):
|
||||||
return pd.Index(['exercise', 'question', 'competence', 'theme', 'comment', 'score_rate', 'is_leveled', 'origin', 'exam_id', 'id'])
|
return pd.Index(
|
||||||
|
[
|
||||||
|
"exercise",
|
||||||
|
"question",
|
||||||
|
"competence",
|
||||||
|
"theme",
|
||||||
|
"comment",
|
||||||
|
"score_rate",
|
||||||
|
"is_leveled",
|
||||||
|
"origin",
|
||||||
|
"exam_id",
|
||||||
|
"id",
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def score_columns(self):
|
def score_columns(self):
|
||||||
return pd.Index(['term', 'exam', 'date', 'exercise', 'question', 'competence', 'theme', 'comment', 'score_rate', 'is_leveled', 'origin', 'exam_id', 'question_id', 'student_name', 'score'])
|
return pd.Index(
|
||||||
|
[
|
||||||
|
"term",
|
||||||
|
"exam",
|
||||||
|
"date",
|
||||||
|
"exercise",
|
||||||
|
"question",
|
||||||
|
"competence",
|
||||||
|
"theme",
|
||||||
|
"comment",
|
||||||
|
"score_rate",
|
||||||
|
"is_leveled",
|
||||||
|
"origin",
|
||||||
|
"exam_id",
|
||||||
|
"question_id",
|
||||||
|
"student_name",
|
||||||
|
"score",
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
def rename_columns(self, dataframe):
|
def rename_columns(self, dataframe):
|
||||||
"""Rename dataframe column to match with `csv_fields`
|
"""Rename dataframe column to match with `csv_fields`
|
||||||
|
@ -238,7 +269,6 @@ class CSVLoader(Loader):
|
||||||
questions = self.get_exam_questions(exams)
|
questions = self.get_exam_questions(exams)
|
||||||
return self.get_questions_scores(questions)
|
return self.get_questions_scores(questions)
|
||||||
|
|
||||||
|
|
||||||
def get_students(self, tribes=[]):
|
def get_students(self, tribes=[]):
|
||||||
"""Get student list
|
"""Get student list
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue