filter excel empty sheet (#8194)

This commit is contained in:
Jyong
2024-09-10 14:55:08 +08:00
committed by GitHub
parent 86f7f245e4
commit af92f19291

View File

@@ -38,7 +38,10 @@ class ExcelExtractor(BaseExtractor):
for sheet_name in wb.sheetnames:
sheet = wb[sheet_name]
data = sheet.values
cols = next(data)
try:
cols = next(data)
except StopIteration:
continue
df = pd.DataFrame(data, columns=cols)
df.dropna(how='all', inplace=True)