Commit ab11b62a authored by scmalte's avatar scmalte
Browse files

aggr.py: remove staff from CX export data (Legi number 00-000-000), and...

aggr.py: remove staff from CX export data (Legi number 00-000-000), and afterwards assert unique Legi numbers
parent 61712ea4
...@@ -47,7 +47,12 @@ def aggregate( ...@@ -47,7 +47,12 @@ def aggregate(
course_csv = course_csv[relevant_course_columns] course_csv = course_csv[relevant_course_columns]
course_csv["TotalScore"] = course_csv["TotalScore"].round(0) course_csv["TotalScore"] = course_csv["TotalScore"].round(0)
course_csv.set_index("Legi", inplace=True) course_csv.set_index("Legi", inplace=True)
## TODO: Remove staff from course_csv course_csv.drop("00-000-000", inplace=True) ## NOTE: We assume that this indicates staff
duplicated_indices: pd.Index = course_csv[course_csv.index.duplicated()].index
assert \
duplicated_indices.size == 0, \
"Unexpectedly found duplicated Legi numbers (other than '00-000-000') in course CSV: {}".format(duplicated_indices.values)
## TODO: Could integrate eDoz data "Leistungskontrollen" to get information whether ## TODO: Could integrate eDoz data "Leistungskontrollen" to get information whether
## or not a student is a repeater ## or not a student is a repeater
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment