I use the following python command, and get a result I do not know exactly how to convert to hours or any other time standard. My goal is to understand mean, min and max values of the behavior of two student groups logging in, and counting all logons per student in each group until a cut date.
Data (col2) - result of subtracting different logon times per student from date when student ends enrolment with university (numbers with a minus in col2 indicate that there are no logons after the cut date):
User Name status Col1 ... Col2 Check Check all
4053 191446 terminated Diploming ... -62 days +00:31:00 0 0
4054 191446 terminated Diploming ... -62 days +00:23:00 0 0
4055 191446 terminated Diploming ... -62 days +00:20:00 0 0
55838 190690 terminated Diploming ... -142 days +21:17:00 0 0
55839 190690 terminated Diploming ... -142 days +15:10:00 0 0
... ... ... ... ... ... ... ...
464817 194056 terminated Bachelor ... -103 days +05:19:00 0 0
466349 193858 terminated Bachelor ... -103 days +20:23:00 0 0
467668 194060 terminated Bachelor ... -153 days +09:59:00 0 0
468590 194018 terminated Bachelor ... -154 days +23:07:00 0 0
469805 175440 terminated Bachelor ... -154 days +13:38:00 0 0
This is the code I am using
result = result.groupby('col1').agg({'col2': ['mean', 'min', 'max']})
print("\nMean, min, and max values of student line logons - indifinite")
print(result)
print("\nresult.columns")
print(result.columns)
This is the result I get
Mean, min, and max values of student line logons
time_diff
mean min max
Col1
Bachelor -8.089769e+12 -1.872721e+13 -3.622951e+10
Diploming -8.718830e+12 -1.586661e+13 -1.426230e+10
How can I get a meaningful result from the 'Mean, min, and max values of student line logons', potentially presenting result like col2 in 'Data (col2)' above? Any wise input from out there is appreciated...;o) Thank you.