aboutsummaryrefslogtreecommitdiff
path: root/toBlackboardCSV.py
diff options
context:
space:
mode:
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}")