diff options
author | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2024-10-23 23:10:46 -0400 |
---|---|---|
committer | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2024-10-23 23:10:46 -0400 |
commit | 9aea1f65dc70be3d2ed889caa64c2f4072bdfcc4 (patch) | |
tree | 632c7e285afef2898c07f1dd15915df3b371999a | |
parent | ab477c86305847556f765fcb2055a745b767e456 (diff) | |
download | GradeBook-9aea1f65dc70be3d2ed889caa64c2f4072bdfcc4.tar.gz GradeBook-9aea1f65dc70be3d2ed889caa64c2f4072bdfcc4.zip |
remove non gradeable columbs for export to BlackBoard
-rwxr-xr-x | toBlackboardCSV.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/toBlackboardCSV.py b/toBlackboardCSV.py index 250da74..3694edc 100755 --- a/toBlackboardCSV.py +++ b/toBlackboardCSV.py @@ -27,4 +27,15 @@ dOut = dOut.loc[ dOut['GroupName'].isin(['student']) ] infoCol=['FirstName', 'LastName', 'GroupName', 'UserHiddenColums', 'UserHiddenGroups', 'UserHiddenGradeCategories', 'SectionNum', 'IdNum'] dOut = dOut.drop(infoCol, axis=1) +# 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) |