aboutsummaryrefslogtreecommitdiff
path: root/regenTheExpertTA.py
diff options
context:
space:
mode:
authorEugeniy E. Mikhailov <evgmik@gmail.com>2023-10-23 09:29:56 -0400
committerEugeniy E. Mikhailov <evgmik@gmail.com>2023-10-23 09:29:56 -0400
commit33fa2ddb517fd5b97327ad4c8075cb71b86d7765 (patch)
treecba0d91736bb8b3bfbbde2a9130bc7db3c50f840 /regenTheExpertTA.py
parent650d805b56ddc0673b57986503116f4fcf2de16f (diff)
downloadGradeBook-33fa2ddb517fd5b97327ad4c8075cb71b86d7765.tar.gz
GradeBook-33fa2ddb517fd5b97327ad4c8075cb71b86d7765.zip
added number rounding when importing from TheExpertTA
Diffstat (limited to 'regenTheExpertTA.py')
-rwxr-xr-xregenTheExpertTA.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/regenTheExpertTA.py b/regenTheExpertTA.py
index 47aac9e..d0277bc 100755
--- a/regenTheExpertTA.py
+++ b/regenTheExpertTA.py
@@ -75,10 +75,14 @@ for c in d.columns:
index = ~d['UserName'].isin( specialUsers )
d.loc[index,c] *= maxP/100 # convert percentage to points
+ # TheExpertTA due to their percentage system generates +/- 0.0000001 scores
+ # which is useless and make very long numbers in tables.
+ # So we are rounding here.
+ d.loc[index, c] = d.loc[index, c].round(4)
+
# now we are trying to guess column category
if 'hw' in c.lower():
d.loc[(d['UserName'] == '_Col_Category_'), c] = 'HomeWork'
-
d.to_csv('TheExpertTA.csv', index=False)