diff options
author | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2024-11-11 09:29:18 -0500 |
---|---|---|
committer | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2024-11-11 09:29:18 -0500 |
commit | fb11e4ced498d2ee0b6c66cfdb4d8259f9698715 (patch) | |
tree | 12145a1ae039d4ae1eabeb2ca58b109ae70f0404 /toBlackboardCSV.py | |
parent | d1892ef5c9a08049a3be73e0e9903c605bfedcd9 (diff) | |
parent | e3ff0c17fe50ef42303f49257b683f6e057ca5c1 (diff) | |
download | GradeBook-fb11e4ced498d2ee0b6c66cfdb4d8259f9698715.tar.gz GradeBook-fb11e4ced498d2ee0b6c66cfdb4d8259f9698715.zip |
Diffstat (limited to 'toBlackboardCSV.py')
-rwxr-xr-x | toBlackboardCSV.py | 12 |
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}") |