From 758047085cfe59fd4d1bce5a94638f71fc6bf2aa Mon Sep 17 00:00:00 2001 From: mxr612 Date: Mon, 2 Jun 2025 16:28:18 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BC=98=E5=8C=96=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=A4=84=E7=90=86=E9=80=BB=E8=BE=91=E5=92=8C=E6=96=87?= =?UTF-8?q?=E6=A1=A3=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除首行跳过规则 - 更新使用说明文档,增加关于晋级晋档起始时间的运行规则说明 --- main.py | 6 +----- 使用说明.md | 6 +++++- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/main.py b/main.py index 535ad46..4c418da 100644 --- a/main.py +++ b/main.py @@ -25,11 +25,6 @@ BaseData = pd.read_excel("原数据.xlsx", sheet_name="入职信息") Promote = pd.read_excel("原数据.xlsx", sheet_name="职务变动") # Level_Limit = pd.read_excel("原数据.xlsx", sheet_name="职位规则",usecols="A:B", skiprows=2, names=["limit","role"]) -BaseData = BaseData.drop(0) -BaseData = BaseData.reset_index(drop=True) -Promote = Promote.drop(0) -Promote = Promote.reset_index(drop=True) - for index, row in BaseData.iterrows(): for col in ["出生年月","任职年月","原职时间","参加工作时间","入职时间", "二档起始", "五档起始", "日期2"]: BaseData.at[index, col] = custom_date_parser(row[col]) @@ -211,6 +206,7 @@ for index, row in BaseData.iterrows(): promote = promote.sort_values(by="任职时间", ascending=False).reset_index(drop=True) BaseData.at[index, "Latest_Role"] = promote.iloc[0]["新职务"] BaseData.at[index, "Latest_Prom"] = promote.iloc[0]["任职时间"] + # 把原职务取出来 if promote.shape[0] > 1: BaseData.at[index, "职务2"] = promote.iloc[1]["新职务"] BaseData.at[index, "日期2"] = promote.iloc[1]["任职时间"] diff --git a/使用说明.md b/使用说明.md index fa27521..599ea83 100644 --- a/使用说明.md +++ b/使用说明.md @@ -31,7 +31,11 @@ 所有日期在输出时会被格式化为“yyyy.mm”,所以在填写的时候可以虚拟一个“日”,但是请保留以保证是日期格式。 -## 2. 打包成 .exe 文件 +## 2. 运行规则 + +晋级晋档起始时间不会进行添加级别档次变化记录。 + +## 3. 打包成 .exe 文件 本程序使用Win7兼容的**Python 3.8.10**,需要在电脑上使用此版本,并确保打包的环境是此版本。