python如何在excel通过多条件得到单元格的数据?

 时间:2024-10-16 15:37:31

1、首先在filepathName = pd.read_excel(filepathName, sep='') #读取表格中数据。

python如何在excel通过多条件得到单元格的数据?

2、然后呢ws = wb.worksheets[0] #获取表格中指定工作表。

python如何在excel通过多条件得到单元格的数据?

3、然后呢for rx in range(1,ws.max_row+1): #遍历表格中的行数。

python如何在excel通过多条件得到单元格的数据?

4、再其次#print(rx)temp_list = []

python如何在excel通过多条件得到单元格的数据?

5、快好了在money = ws.cell(row=rx, column=1).value #获取表中第1列所有的数据kind = ws.cell(row=rx, column=2).value #获取表中第2列所有的数据data_dic.append(temp_list)

python如何在excel通过多条件得到单元格的数据?

6、最后#检测结果for l in data_dic:print(l[0],l[1])

python如何在excel通过多条件得到单元格的数据?
  • python如何将元组写入excel
  • typora如何调出超链接
  • 如何理解PYTHON代码缩进的问题
  • python中No module named 'xlrd'解决方案
  • IntelliJIDEA代码文件中的文件头设置
  • 热门搜索
    广东人怎么样 怎么保护牙齿 大家的第一次是怎么发生的 人类是怎么来的 贝拉米奶粉怎么样 怎么减肥最快 dnf矛盾的结晶体怎么得 工作心得怎么写 烂牙痛怎么快速止痛 宝宝湿疹怎么办