03 2022 档案
摘要:1 # encoding:utf-8 2 3 from tkinter import * 4 from tkinter import messagebox 5 from tkinter import filedialog 6 import pandas as pd 7 ''' 8 画图形界面,供us
阅读全文
摘要:1 # encoding:utf-8 2 3 from tkinter import * 4 from tkinter import messagebox 5 from tkinter import filedialog 6 7 ''' 8 画图形界面,供user操作 9 界面功能: 10 1.US
阅读全文
摘要:1 # encoding:utf-8 2 3 import pandas as pd 4 from openpyxl import load_workbook 5 6 ''' 7 本案例获取所有符合的列数据 8 去除了每个栏位的空格 9 去除了空行数据 10 去除了第一列为空的整行数据 11 多个s
阅读全文
摘要:1 # encoding:utf-8 2 3 import pandas as pd 4 from openpyxl import load_workbook 5 6 ''' 7 本案例获取所有符合的列数据 8 去除了每个栏位的空格 9 去除了空行数据 10 去除了第一列为空的整行数据 11 多个s
阅读全文
摘要:1 def openxls(self): 2 '''获取第一个sheet的数据''' 3 df = pd.read_excel(self.filepath, sheet_name=0) 4 '''获取行数列数''' 5 hanglie = df.shape 6 hang = hanglie[0] 7
阅读全文
摘要:1 # encoding:utf-8 2 3 import pandas as pd 4 ''' 5 整合sheet 6 将符合的列放在第一个sheet 7 将符合的列放在第二个sheet 8 ''' 9 10 class OpenMyXLS(): 11 def __init__(self, fil
阅读全文
摘要:# encoding:utf-8 import pandas as pd class OpenMyXLS(): def __init__(self, filepath): self.filepath = filepath self.openxls() def openxls(self): df =
阅读全文
摘要:1 # encoding:utf-8 2 3 import pandas as pd 4 5 class OpenMyXLS(): 6 def __init__(self, filepath): 7 self.filepath = filepath 8 self.openxls() 9 10 def
阅读全文
摘要:1 # encoding:utf-8 2 3 import pandas as pd 4 5 6 class QuChongFu(): 7 def __init__(self): 8 self.qcfxls() 9 10 def qcfxls(self): 11 # 读取excel中的数据 12 d
阅读全文
摘要:#encoding:utf-8 """ 目标:将一组数组写入倒XLS文件中 """ import xlwt class myWriteXls(): def __init__(self,filename): self.filename = filename self.writexls() def wr
阅读全文
摘要:#encoding:utf-8 ''' 目标:读取XLS文件中的内容 步骤: 1.打开已有XLS文件 2.获取sheet名称 3.获取对应sheet第一行数据 4.获取其他行数据 ''' import xlrd '''打开文件''' class OpenMyXLS(): def __init__(s
阅读全文