Selaa lähdekoodia

example of next(, None) (#24345)

tags/1.8.0
Asuka Minato 2 kuukautta sitten
vanhempi
commit
51cc2bf429
No account linked to committer's email address
1 muutettua tiedostoa jossa 2 lisäystä ja 3 poistoa
  1. 2
    3
      api/core/rag/extractor/excel_extractor.py

+ 2
- 3
api/core/rag/extractor/excel_extractor.py Näytä tiedosto

@@ -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…
Peruuta
Tallenna