소스 검색

example of next(, None) (#24345)

tags/1.8.0
Asuka Minato 2 달 전
부모
커밋
51cc2bf429
No account linked to committer's email address
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)


Loading…
취소
저장