testing stats
This commit is contained in:
25
scripts/testing_stats.py
Normal file
25
scripts/testing_stats.py
Normal file
@@ -0,0 +1,25 @@
|
||||
import pandas as pd
|
||||
import os
|
||||
import numpy as np
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
curdir = os.getcwd()
|
||||
path_delim = '/'
|
||||
df = pd.read_excel(curdir + path_delim + "data/tests_03_01_2024_14_41.xlsx", sheet_name="data")
|
||||
|
||||
print(df.columns)
|
||||
df['deviceId'].hist()
|
||||
# plt.show()
|
||||
|
||||
print(df)
|
||||
|
||||
df_final = df.sort_values('testTime').drop_duplicates('_id', keep='last')
|
||||
print(df_final)
|
||||
|
||||
print(df_final.groupby(["classificationResult"]).describe()["calculatedRatio"]["count"])
|
||||
|
||||
writer = pd.ExcelWriter(curdir + path_delim + "data/test_stats03.xlsx", engine = 'openpyxl')
|
||||
df_final.to_excel(writer, sheet_name = 'op', index=False)
|
||||
df_final.groupby(["classificationResult"]).describe()["calculatedRatio"]["count"].to_excel(writer, sheet_name = "hc_count")
|
||||
df_final.groupby(["result"]).describe()["resultRatio"]["count"].to_excel(writer, sheet_name = "tr_count")
|
||||
writer.close()
|
||||
Reference in New Issue
Block a user