aboutsummaryrefslogtreecommitdiff
path: root/toBlackboardCSV.py
diff options
context:
space:
mode:
authorEugeniy E. Mikhailov <evgmik@gmail.com>2024-11-11 09:29:18 -0500
committerEugeniy E. Mikhailov <evgmik@gmail.com>2024-11-11 09:29:18 -0500
commitfb11e4ced498d2ee0b6c66cfdb4d8259f9698715 (patch)
tree12145a1ae039d4ae1eabeb2ca58b109ae70f0404 /toBlackboardCSV.py
parentd1892ef5c9a08049a3be73e0e9903c605bfedcd9 (diff)
parente3ff0c17fe50ef42303f49257b683f6e057ca5c1 (diff)
downloadGradeBook-fb11e4ced498d2ee0b6c66cfdb4d8259f9698715.tar.gz
GradeBook-fb11e4ced498d2ee0b6c66cfdb4d8259f9698715.zip
Merge branch 'master' of qo.physics.wm.edu:evmik/GradeBookHEADmaster
Diffstat (limited to 'toBlackboardCSV.py')
-rwxr-xr-xtoBlackboardCSV.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/toBlackboardCSV.py b/toBlackboardCSV.py
index 019158c..fdf16da 100755
--- a/toBlackboardCSV.py
+++ b/toBlackboardCSV.py
@@ -36,6 +36,16 @@ infoCol = [
]
dOut = dOut.drop(infoCol, axis=1)
-fout = "BlackBoard.csv"
+# drop non gradable columns
+cCat = dIn["UserName"] == "_Col_Category_"
+colToDrop = []
+for c in dOut.columns:
+ if c == "Username":
+ continue
+ category = dIn[cCat][c][0]
+ if category not in ["HomeWork", "MidTerm", "FinalExam", "weighted_column"]:
+ colToDrop.append(c)
+dOut = dOut.drop(colToDrop, axis=1)
+
dOut.to_csv("BlackBoard.csv", index=False)
print(f"Data was exported to {fout}")