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()