#3.4 课堂小案例_找到41码鞋子的坐标
#coding:utf-8 import openpyxl workbook=openpyxl.load_workbook('京东鞋子评论信息.xlsx') sheet=workbook['评论信息'] cols=sheet['D'] #获取D列数据 count=0 for col in cols: if col.value=='41': #查找值为41的数 count += 1 print('D'+str(col.row)) #查找值41的行并输出 print('41码的鞋子一共销售了',count,'双') #输出有多少双为41的鞋子
标签:count,41,3.4,鞋子,workbook,课堂,col From: https://www.cnblogs.com/988MQ/p/16842221.html