tests per center

This commit is contained in:
Pritimay Sarkar
2023-10-07 18:50:17 +05:30
parent a1117e30b1
commit 1f9f3644f7

View File

@@ -0,0 +1,27 @@
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/users_06_10_2023_22_25.xlsx", sheet_name="Sheet1")
# df.plot(kind = 'scatter', x = 'testTime', y = 'calculatedRatio')
# plt.show()
print(df.columns)
# df = df[(df["testStatus"] == True) and (~df["incubationTime"].isnan())]
print("tests count:", df.shape)
print(df.groupby(["registrationCenterName"]).describe())
df_count = df.groupby(["registrationCenterName"]).describe()["birthYear"]["count"]
print(df.groupby(["registrationCenterName"]).describe()["birthYear"]["count"])
writer = pd.ExcelWriter(curdir + path_delim + "data/test_per_center1.xlsx", engine = 'openpyxl')
df_count.to_excel(writer, sheet_name = "count")
writer.close()