- 博客(20)
- 收藏
- 关注
原创 新版stdf处理
import pandas as pdimport timeread_file = 'stdf原始(1).xlsx'color_out_file = 'Color_V2.xlsx'devices_out_file = 'Devices_V2.xlsx'fixed_out_file = 'Devices_Fixed_Item_V2.xlsx'other_out_file = 'Devices_Other_Item_V2.xlsx'parameter_out_file = 'Paramete.
2022-04-17 12:10:06
651
原创 增加读取时,x和y重复的情况,去除重复项
import pandas as pd# 要读取处理的excel文件read_file = 'R158745W03-Q2341233.xlsx'# 定义要输出的文件名color_out_file = 'Color_V2.xlsx'devices_out_file = 'Devices_V2.xlsx'fixed_out_file = 'CP_Devices_Fixed_Item_V2.xlsx'other_out_file = 'CP_Devices_Other_Item_V2.xlsx.
2022-04-06 11:48:52
166
原创 单文件拆5文件
import pandas as pd# 要读取处理的excel文件read_file = 'R158745W03-Q2341233.xlsx'# 定义要输出的文件名color_out_file = 'Color_V2.xlsx'devices_out_file = 'Devices_V2.xlsx'fixed_out_file = 'CP_Devices_Fixed_Item_V2.xlsx'other_out_file = 'CP_Devices_Other_Item_V2.xlsx.
2022-04-03 21:32:38
71
原创 合并文件夹下的所有文件
import osimport pandas as pd# 要合并的文件夹read_dir = './'# 要保存的路径save_file_path = 'data.xlsx'files = os.listdir(read_dir)ori_df = Nonefor file in files: # 拼装路径,跳过 file_path = os.path.join(read_dir, file) if '.xlsx' not in file or '~$' in.
2022-03-29 11:24:18
1258
原创 多sheet转单sheet
import pandas as pdread_file = '原始表.xlsx'save_file = '结果表.xlsx'df = pd.read_excel(read_file, sheet_name=None)out_data = []for sheet in df: print('当前sheet: ', sheet) date = None customer = None polish = None remark = None .
2022-03-23 11:05:44
367
原创 抽取数据320
import pandas as pd# 读取的原始文件read_file = '原始文件.xlsx'# 要输出的文件名substrate_coa_data = 'SUBSTRATE_EPITAXY_SUBSTRATE_COA_DATA_11.xlsx'epi_coa_data = 'SUBSTRATE_EPITAXY_SIC_EPI_COA_DATA_22.xlsx'thikness_data = 'SUBSTRATE_EPITAXY_SIC_EPI_THIKNESS_DATA_33.xl
2022-03-20 22:29:08
1387
原创 txt转5个excel
import pandas as pd# 要读取处理的excel文件read_file = '原始.txt'# 定义要输出的文件名color_out_file = 'Color_V2.xlsx'devices_out_file = 'Devices_V2.xlsx'fixed_out_file = 'Devices_Fixed_Item_V2.xlsx'other_out_file = 'Devices_Other_Item_V2.xlsx'parameter_out_file = '.
2022-02-16 23:29:21
389
原创 多文件处理
import pandas as pdimport timeimport osfrom pystdf.Importer import STDF2DataFrameimport pystdf.V4 as V4def process_to_color(): df_mir = pd.read_excel(read_file, sheet_name='MIR') df_sbr = pd.read_excel(read_file, sheet_name='SBR') # pri.
2022-02-09 12:03:36
1041
原创 stdf处理
import pandas as pdread_file = 'stdf原始数据.xlsx'color_out_file = 'Color_V2.xlsx'def process_to_color(): df_mir = pd.read_excel(read_file, sheet_name='MIR') df_sbr = pd.read_excel(read_file, sheet_name='SBR') print(df_mir.columns) part.
2022-01-30 11:22:53
1487
原创 GM_PCS_process
# coding=utf-8import pandas as pdimport os'''手动配置部分'''# 指定要读取excel的目录file_dir = r'../month_1'# 指定要输出的文件out_file = r'result.csv'# 定义列头columns = ['PROJECT_TYPE', 'PRODUCT', 'PRODUCT_VERSION', 'LOT', 'TEST_ITEM', 'TEST_NODE', 'FACTORY', 'RETEST',.
2022-01-08 23:44:33
324
原创 txt转excel
import openpyxlfrom openpyxl.utils import get_column_letterread_file = 'txt1.txt'# 跳过指定行skip_line = 0# 偏移padding_x = 100padding_y = 100# 保存文件save_file = 'excel文件.xlsx'# 创建excelxls = openpyxl.Workbook()sheet = xls.activetitle2 = Nonewith .
2022-01-05 20:13:57
551
原创 ship合并
import pandas as pdfrom datetime import datetimedef part_no(product): return product.replace('需求', '').replace('产出计划', '')def product(product): if '需求' in product: return '需求' elif '产出' in product: return '产出' else:.
2021-12-30 00:26:25
274
原创 Field处理
import pandas as pdread_file = 'Wip原始(1).xlsx'save_file = 'Wip处理结果.csv'def fox(row): com = row if '.' in str(com): return int(com * 100) else: return str(com).replace('%', '')df = pd.read_excel(read_file)df["Cycle T.
2021-12-28 20:37:22
708
原创 Wip处理
import pandas as pdread_file = 'Wip原始(1).xlsx'save_file = 'Wip处理结果.csv'df = pd.read_excel(read_file)newDf = pd.DataFrame(df, columns=['Lot_status', 'Wafer_shipping_count', 'Wafer_shipping_data', '备注'])newDf["Cycle Time"] = '-44527'newDf.to_csv(.
2021-12-28 16:15:57
729
原创 txt比对
import openpyxl# 创建excelxls1 = openpyxl.Workbook()# 激活sheetsheet1 = xls1.activematrix1 = []with open('txt1.txt', 'r') as fp: lines = fp.readlines() for line in lines: line = [x for x in line.strip()] sheet1.append(line) .
2021-12-21 19:09:37
717
原创 excel处理运算
import openpyxlfrom openpyxl.cell.cell import MergedCellimport pandas as pdfrom datetime import datetimedef parse_old_excel(): # 先做成格式化数据 file = openpyxl.load_workbook(file_name) # 读文件 sheet_name = file.sheetnames ws = file[sheet_n.
2021-12-20 23:44:31
477
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人