Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision

Target

Select target project
  • poquet/millian/ut3-survival
1 result
Select Git revision
Show changes
Commits on Source (2)
......@@ -14,9 +14,15 @@ def read_parse_participants(filename: str) -> pandas.DataFrame:
df = pandas.read_csv(filename)
column_names = [str(x) for x in df.columns]
expected_column_names = ['Prénom', 'Nom', "Numéro d'identification", 'Adresse de courriel']
if column_names != expected_column_names:
raise RuntimeError(f"unexpected column names in moodle participant file '{filename}': got '{column_names}' while '{expected_column_names}' was expected")
expected_column_names = ['Prénom', 'Nom de famille', "Numéro d’identification", 'Adresse de courriel']
missing_cols = list()
for col_name in expected_column_names:
if col_name not in column_names:
missing_cols.append(col_name)
if len(missing_cols) > 0:
raise RuntimeError(f"missing column names in moodle participant file '{filename}': '{missing_cols}'. got '{column_names}' while '{expected_column_names}' was expected")
df.rename(columns={
expected_column_names[0]: "moodle_firstname",
......