mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-08 10:26:50 +08:00
filter excel empty sheet (#8194)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user