From 33fa2ddb517fd5b97327ad4c8075cb71b86d7765 Mon Sep 17 00:00:00 2001 From: "Eugeniy E. Mikhailov" Date: Mon, 23 Oct 2023 09:29:56 -0400 Subject: added number rounding when importing from TheExpertTA --- regenTheExpertTA.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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) -- cgit v1.2.3