ngv中g转化率改为保留三位小数

This commit is contained in:
z66
2025-12-11 09:13:14 +08:00
parent 262d443b5c
commit 42da18e929
9 changed files with 188 additions and 223 deletions
+5
View File
@@ -110,6 +110,11 @@ class UpdateNGVData:
filtered_df[col + "_staff_id"] = staff_ids
logger.info(f"人员转换完成")
# 数字保留3位小数
filtered_df['g_month_percentage'] = (pd.to_numeric(data_NGV_j['g_month_percentage'], errors='coerce')
.round(3)
.apply(lambda x: f"{x:.3f}" if pd.notna(x) else ''))
# filtered_df.to_csv(r"D:\Idea Project\SaaS_V1.3\back_ground_module\output\NGV.csv")
# 生成包含所有行转换后的字典列表