ソースを参照

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)


読み込み中…
キャンセル
保存