diff --git a/scripts/merge_csv.py b/scripts/merge_csv.py index 2120a28..cb7ee9e 100644 --- a/scripts/merge_csv.py +++ b/scripts/merge_csv.py @@ -3,8 +3,12 @@ import pandas as pd import openpyxl import os +rootdir = os.getcwd() + def consolidate(curdir): + print(os.path.split(curdir)[1]) + # list all csv files only csv_files = glob.glob(curdir + '/*.{}'.format('csv')) # print(csv_files) @@ -39,14 +43,13 @@ def consolidate(curdir): 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_csv("D8 Merged.csv", index=False) -rootdir = os.getcwd() for file in os.listdir(rootdir): d = os.path.join(rootdir, file) if os.path.isdir(d): diff --git a/src/App.js b/src/App.js index 2734357..67be8cd 100644 --- a/src/App.js +++ b/src/App.js @@ -58,10 +58,10 @@ function App() { const patient = document.data(); patients.push(patient); const { gender } = patient; - if (gender === 'Male') { + if (gender.toLowerCase() === 'male') { maleCount++; } - if (gender === 'Female') { + if (gender.toLowerCase() === 'female') { femaleCount++; } });