diff options
author | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2023-10-23 09:29:56 -0400 |
---|---|---|
committer | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2023-10-23 09:29:56 -0400 |
commit | 33fa2ddb517fd5b97327ad4c8075cb71b86d7765 (patch) | |
tree | cba0d91736bb8b3bfbbde2a9130bc7db3c50f840 | |
parent | 650d805b56ddc0673b57986503116f4fcf2de16f (diff) | |
download | GradeBook-33fa2ddb517fd5b97327ad4c8075cb71b86d7765.tar.gz GradeBook-33fa2ddb517fd5b97327ad4c8075cb71b86d7765.zip |
added number rounding when importing from TheExpertTA
-rwxr-xr-x | regenTheExpertTA.py | 6 |
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) |