recombine 20 oct file

This commit is contained in:
Pritimay Sarkar
2023-11-11 16:04:30 +05:30
parent f99ecb11c1
commit 64b0d7f953

View File

@@ -5,7 +5,7 @@ import matplotlib.pyplot as plt
curdir = os.getcwd()
path_delim = '/'
df1 = pd.read_excel(curdir + path_delim + "data/users_20_10_2023_18_03.xlsx", sheet_name="Sheet1")
df1 = pd.read_excel(curdir + path_delim + "data/users_21_10_2023_11_27.xlsx", sheet_name="Sheet1")
df2 = pd.read_excel(curdir + path_delim + "data/20 oct 2023 final results.xlsx", sheet_name="data")
df2 = df2.sort_values('testTime')
@@ -49,10 +49,10 @@ plt.show()
# df['category'].plot.pie()
# plt.show()
df = df[["_id", "name_x", "abhaId", "aadharId", "Age", "gender", "category", "maritalStatus", "house", "district", "state", "pinCode", "phoneNumber", "classificationResult", "bloodGroup", "createdAt", "caste", "registrationCenterName"]]
df = df[["_id", "name_x", "abhaId", "aadharId", "Age", "gender", "category", "maritalStatus", "house", "district", "state", "pinCode", "phoneNumber", "classificationResult", "bloodGroup", "testTime", "caste", "registrationCenterName"]]
print(df)
df.rename(columns={'_id': "Sample ID", "name_x": "Name", "abhaId": "ABHA ID", "aadharId": "Aadhaar ID", "gender": "Gender", "category": "Category", "maritalStatus": "Marital Status", "house": "Address", "district": "District", "state": "State", "pinCode": "Pincode", "phoneNumber": "Mobile Number", "createdAt": "Date", "classificationResult": "Test Result", "bloodGroup": "Blood Group", "Age": "Age", "caste": "Caste", "registrationCenterName": "Center"}, inplace = True)
df.rename(columns={'_id': "Sample ID", "name_x": "Name", "abhaId": "ABHA ID", "aadharId": "Aadhaar ID", "gender": "Gender", "category": "Category", "maritalStatus": "Marital Status", "house": "Address", "district": "District", "state": "State", "pinCode": "Pincode", "phoneNumber": "Mobile Number", "testTime": "Date", "classificationResult": "Test Result", "bloodGroup": "Blood Group", "Age": "Age", "caste": "Caste", "registrationCenterName": "Center"}, inplace = True)
df = df.reindex(["Sample ID", "Name", "ABHA ID", "Aadhaar ID", "Age", "Gender", "Caste", "Category", "Marital Status", "Address", "District", "State", "Pincode", "Mobile Number", "Date", "Test Result", "Blood Group", "Center"], axis=1)
# df['Date'] = pd.to_datetime(df["Date"].dt.strftime('%d-%m-%Y'))