示例

import xlrd
from tqdm import tqdm
readbook= xlrd.open_workbook("./情感分析.xlsx")
reviews = open("3分类情感分析.txt","a",encoding="utf-8")

#通过表的索引号读取表格
sheet = readbook.sheet_by_index(0)

#行数
nrows = sheet.nrows
#列数
ncols = sheet.ncols

bar = tqdm(range(nrows),total=nrows)

for i in bar:
    # print()
    reviews.write(sheet.cell_value(i,0)+"\n")

  

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-16
  • 2021-11-21
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-11
  • 2021-07-15
相关资源
相似解决方案