I'm fairly new to pandas, I'm attempting to read an excel file and have the data returned to me based on specific cell values.
I have an excel workbook, with several sheets that has data inside tables presented like so.
LUID DATE & TIME IN S# - IN STATUS S# - OUT DATE & TIME OUT
PTLZ191238 2021-02-21 S12345 LOADING (OUT) s123456 2021-03-01
Ive been able to iterate through the workbook sheets, now i want the data to be returned only if DATE & TIME IN has a value, and DATE & TIME OUT is blank. this is my code so far
import pandas as pd
#main Tyr Workbook
xl_file = 'excel_workbook.xlsm'
worksheets
fwd = pd.read_excel(xl_file, sheet_name='sheet1`')
epes = pd.read_excel(xl_file,sheet_name='sheet2')
mvt = pd.read_excel(xl_file,sheet_name='sheet3')
ls = pd.read_excel(xl_file,sheet_name='sheet4')
knight = pd.read_excel(xl_file,sheet_name='sheet5')
hzl = pd.read_excel(xl_file,sheet_name='sheet6')
cfi = pd.read_excel(xl_file,sheet_name='sheet7')
hub = pd.read_excel(xl_file,sheet_name='sheet8')
eh = pd.read_excel(xl_file,sheet_name='sheet9')
ttl = pd.read_excel(xl_file,sheet_name='sheet10')
all_sheet = [fwd,epes,mvt,ls,knight,hzl,cfi,hub,eh,ttl]
for sheet in all_sheet:
print(sheet.head(10))
Ive scoured through the documents and cant seem to find my answer, any help would be greatly appreciated