Feat: empty dataframe in get_exams

This commit is contained in:
Bertrand Benjamin 2021-04-13 06:26:21 +02:00
parent 6331573940
commit 94f8080acd

View File

@ -106,7 +106,9 @@ class CSVLoader(Loader):
self._config["id_templates"]["exam"], exam.iloc[0] self._config["id_templates"]["exam"], exam.iloc[0]
) )
exams.append(exam) exams.append(exam)
return pd.concat(exams) if exams:
return pd.concat(exams)
return pd.DataFrame(columns=["name", "date", "term", "origin", "tribe", "id"])
def get_exam_questions(self, exams=[]): def get_exam_questions(self, exams=[]):
"""Get questions for exams stored in score_files """Get questions for exams stored in score_files