make gender case insensitve
This commit is contained in:
@@ -3,8 +3,12 @@ import pandas as pd
|
|||||||
import openpyxl
|
import openpyxl
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
rootdir = os.getcwd()
|
||||||
|
|
||||||
def consolidate(curdir):
|
def consolidate(curdir):
|
||||||
|
|
||||||
|
print(os.path.split(curdir)[1])
|
||||||
|
|
||||||
# list all csv files only
|
# list all csv files only
|
||||||
csv_files = glob.glob(curdir + '/*.{}'.format('csv'))
|
csv_files = glob.glob(curdir + '/*.{}'.format('csv'))
|
||||||
# print(csv_files)
|
# print(csv_files)
|
||||||
@@ -39,14 +43,13 @@ def consolidate(curdir):
|
|||||||
|
|
||||||
df_csv_append = df_csv_append.reindex(sorted(df_csv_append.columns), axis=1)
|
df_csv_append = df_csv_append.reindex(sorted(df_csv_append.columns), axis=1)
|
||||||
|
|
||||||
outfile = curdir + "/D" + os.path.split(curdir)[1].split()[1] + "_Merged.xlsx"
|
outfile = rootdir + "/" + os.path.split(curdir)[1] + "_Merged.xlsx"
|
||||||
|
|
||||||
df_csv_append.to_excel(outfile, index=False)
|
df_csv_append.to_excel(outfile, index=False)
|
||||||
|
|
||||||
# df_csv_append.to_csv("D8 Merged.csv", index=False)
|
# df_csv_append.to_csv("D8 Merged.csv", index=False)
|
||||||
|
|
||||||
|
|
||||||
rootdir = os.getcwd()
|
|
||||||
for file in os.listdir(rootdir):
|
for file in os.listdir(rootdir):
|
||||||
d = os.path.join(rootdir, file)
|
d = os.path.join(rootdir, file)
|
||||||
if os.path.isdir(d):
|
if os.path.isdir(d):
|
||||||
|
|||||||
@@ -58,10 +58,10 @@ function App() {
|
|||||||
const patient = document.data();
|
const patient = document.data();
|
||||||
patients.push(patient);
|
patients.push(patient);
|
||||||
const { gender } = patient;
|
const { gender } = patient;
|
||||||
if (gender === 'Male') {
|
if (gender.toLowerCase() === 'male') {
|
||||||
maleCount++;
|
maleCount++;
|
||||||
}
|
}
|
||||||
if (gender === 'Female') {
|
if (gender.toLowerCase() === 'female') {
|
||||||
femaleCount++;
|
femaleCount++;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user