I have the xls data ( Master Sheet) attached in the [![sample xlsx data][1]][1]screenshot here.
As a beginner in Python and Data science , I am trying to read the sheets in xlsx file as below:
Load pandas
import pandas as pd
# Read CSV file into DataFrame df
sheet1, sheet2 = None, None
with pd.ExcelFile("blood_data.xlsx") as reader:
sheet1 = pd.read_excel(reader, sheet_name='Master sheet')
sheet2 = pd.read_excel(reader, sheet_name='Another Sheet')
# Show dataframe
print(sheet1)
I am getting all the 110 rows and columns in the output, but I want to filter based on the condition which is shown in green in the screenshot. Hb Male 13-17 and Bilirubinn 0.3-1.2 . If the values are not in range I have to print the name of the candidate. Please help me in applying a multi-column-based filter using panda to achieve my result.
Sample input file: https://github.com/wittymindstech/medical-data-analysis/blob/main/blood_data.xlsx
output: MEHRAWAN, RAKHI etc