Commit ac0f7adb authored by Jialin's avatar Jialin

几乎无改动

parent 8b34e230
......@@ -8,7 +8,7 @@ import re
import xlsxwriter
def brand_washing(filepath,thre=0.5,inner_thre=0.5,a=1,sheet_name=0):
def brand_washing(filepath,thre=0.5,inner_thre=0.8,a=1,sheet_name=0):
# filepath:文件路径,thre为两个品牌下型号重合率阈值,inner_thre为两个品牌下某条型号内关键词重合率阈值,a为权重调整,sheet_name为表单名
df = pd.read_excel(filepath, sheet_name=sheet_name, converters = {'产品编码':str})
# 处理缺失值
......@@ -244,6 +244,6 @@ def brand_washing(filepath,thre=0.5,inner_thre=0.5,a=1,sheet_name=0):
workbook.close()
if __name__ == '__main__':
filepath = 'E:\\ZDZC\\扫描仪参数确认.xlsx'
filepath = 'E:\\ZDZC\\激光打印机参数确认.xlsx'
brand_washing(filepath)
......@@ -227,10 +227,10 @@ def class_washing(category, filepath, c_list,a=0.02, b=0.01):
if __name__ == '__main__':
#category='激光打印机'
#filepath="E:\\ZDZC\\激光打印机参数确认.xlsx"
#c_list=[6,7,-4,-3]
category = '扫描仪'
filepath="E:\\ZDZC\\扫描仪参数确认.xlsx"
c_list=[7,8,9]
category='激光打印机'
filepath="E:\\ZDZC\\激光打印机参数确认.xlsx"
c_list=[6,7,-4,-3]
# category = '扫描仪'
# filepath="E:\\ZDZC\\扫描仪参数确认.xlsx"
# c_list=[7,8,9]
class_washing(category, filepath, c_list)
......@@ -149,5 +149,5 @@ def product_washing(filepath, thre=1, a=0):
if __name__ == '__main__':
filepath = "E:\\ZDZC\\扫描仪参数确认.xlsx"
filepath = "E:\\ZDZC\\激光打印机参数确认.xlsx"
product_washing(filepath)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment