浏览代码

example of next(, None) (#24345)

tags/1.8.0
Asuka Minato 2 个月前
父节点
当前提交
51cc2bf429
没有帐户链接到提交者的电子邮件
共有 1 个文件被更改,包括 2 次插入3 次删除
  1. 2
    3
      api/core/rag/extractor/excel_extractor.py

+ 2
- 3
api/core/rag/extractor/excel_extractor.py 查看文件

@@ -34,9 +34,8 @@ class ExcelExtractor(BaseExtractor):
for sheet_name in wb.sheetnames:
sheet = wb[sheet_name]
data = sheet.values
try:
cols = next(data)
except StopIteration:
cols = next(data, None)
if cols is None:
continue
df = pd.DataFrame(data, columns=cols)


正在加载...
取消
保存